cpp/language/operator logical

Returns the result of a boolean operation.

Explanation
The logic operator expressions have the form

@1@ Logical NOT @2@ Logical AND @3@ Logical inclusive OR

If the operand is not, it is converted to using : it is only well-formed if the declaration  is well-formed, for some invented temporary.

The result is a prvalue.

For the built-in logical NOT operator, the result is if the operand is. Otherwise, the result is.

For the built-in logical AND operator, the result is if both operands are. Otherwise, the result is. This operator is : if the first operand is, the second operand is not evaluated.

For the built-in logical OR operator, the result is if either the first or the second operand (or both) is. This operator is short-circuiting: if the first operand is, the second operand is not evaluated.

Note that do not perform short-circuiting.

Results
In, the following built-in function signatures participate in overload resolution:

Standard library
Because the short-circuiting properties of and  do not apply to overloads, and because types with boolean semantics are uncommon, only two standard library classes overload these operators: