cpp/language/operator incdec

Increment/decrement operators increment or decrement the value of the object.

Explanation
Pre-increment and pre-decrement operators increments or decrements the value of the object and returns a reference to the result.

Post-increment and post-decrement creates a copy of the object, increments or decrements the value of the object and returns the copy from before the increment or decrement.

Built-in prefix operators
The prefix increment and decrement expressions have the form

@1@ prefix increment (pre-increment) @2@ prefix decrement (pre-decrement)

The operand of a built-in prefix increment or decrement operator must be a modifiable (non-const)  of  arithmetic type or pointer to completely-defined. The expression is exactly equivalent to, and the expression  is exactly equivalent to , that is, the prefix increment or decrement is an lvalue expression that identifies the modified operand. All arithmetic conversion rules and pointer arithmetic rules defined for apply and determine the implicit conversion (if any) applied to the operand as well as the return type of the expression.

In, for every optionally volatile-qualified arithmetic type other than , and for every optionally volatile-qualified pointer  to optionally cv-qualified object type, the following function signatures participate in overload resolution:

Built-in postfix operators
The postfix increment and decrement expressions have the form

@1@ postfix increment (post-increment) @2@ postfix decrement (post-decrement)

The operand of a built-in postfix increment or decrement operator must be a modifiable (non-const)  of  arithmetic type or pointer to completely-defined. The result is copy of the original value of the operand. As a side-effect, the expression modifies the value of its operand as if by evaluating, and the expression  modifies the value of its operand as if by evaluating. All arithmetic conversion rules and pointer arithmetic rules defined for apply and determine the implicit conversion (if any) applied to the operand as well as the return type of the expression.

In, for every optionally volatile-qualified arithmetic type other than , and for every optionally volatile-qualified pointer  to optionally cv-qualified object type, the following function signatures participate in overload resolution:

Standard library
Increment and decrement operators are overloaded for many standard library types. In particular, every overloads operator++ and every  overloads operator--, even if those operators are no-ops for the particular iterator.