Export (0) Print
Expand All
2 out of 3 rated this helpful - Rate this topic

7.6.3 Logical negation operator

Visual Studio .NET 2003

For an operation of the form !x, unary operator overload resolution (Section 7.2.3) is applied to select a specific operator implementation. The operand is converted to the parameter type of the selected operator, and the type of the result is the return type of the operator. Only one predefined logical negation operator exists:

bool operator !(bool x);

This operator computes the logical negation of the operand: If the operand is true, the result is false. If the operand is false, the result is true.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
© 2014 Microsoft. All rights reserved.