19.1.  Operators

[ fromfile: operators.xml id: operators ]

Operators fall into broad classifications according to their primary use.

Assignment operators =, +=, *=, ...
Arithmetic operators +, -, *, /, %
Relational operators <, <=, >, >=, ==, !=
Logical operators &&, ||, !
Bitwise operators &, |, ^, ~, <<, >>
Memory management operators new, delete, sizeof
Pointer and access operators *, &, ., ->, [], ()
Scope resolution operators ::
Miscellaneous operatorsconditional(?:), comma(,)

Table 19.1. Operator Aliases

OperatorAlias
&& and
& bitand
&= and_eq
|| or
| bitor
|= or_eq
^ xor
^= xor_eq
! not
!= not_eq
~ compl

Operator Characteristics

Operators have the following special characteristics: