Logical operators
De cppreference.com
|
|
This page has been machine-translated from the English version of the wiki using Google Translate.
The translation may contain errors and awkward wording. Hover over text to see the original version. You can help to fix errors and improve the translation. For instructions click here. |
<metanoindex/>
Retourne le résultat d'une opération booléenne .
Original:
Returns the result of a boolean operation.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
| Operator name | Syntax | Overloadable | Prototype examples (for class T)
| |
|---|---|---|---|---|
| Inside class definition | Outside class definition | |||
| negation | not a
|
Yes | bool T::operator!() const;
|
bool operator!(const T &a);
|
| AND | a and b
|
Yes | bool T::operator&&(const T2 &b) const;
|
bool operator&&(const T &a, const T2 &b);
|
| inclusive OR | a or b
|
Yes | bool T::operator||(const T2 &b) const;
|
bool operator||(const T &a, const T2 &b);
|
| ||||