C++ Logo

std-discussion

Advanced search

On P2971R0 and implication operator

From: Farid Mehrabi <farid.mehrabi_at_[hidden]>
Date: Thu, 24 Apr 2025 01:13:30 +0330
Hi,

A coffee time alternative missing from the proposal:
Boolean "Less than or equal" is implication:

bool implies(bool a, bool b){
       //mathematicaly: a => b
       return a <= b; // inverted syntax!
};

The only drawback is absence of shortcut semantics.
But given the asymmetry of implication, shortcut semantics may be difficult
to justify.
This, for shortcut semantics, proper disjunction or conjunction equivalent
can be used.

how am I supposed to end the twisted road of your hair in such a dark
night??
unless the candle of your face does shed some light upon my way!!!

Received on 2025-04-23 21:43:44