tmp/tmpap98a3ff/{from.md → to.md}
RENAMED
|
@@ -1,17 +1,16 @@
|
|
| 1 |
### Increment and decrement <a id="over.inc">[[over.inc]]</a>
|
| 2 |
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
argument will have value zero.[^12]
|
| 13 |
|
| 14 |
[*Example 1*:
|
| 15 |
|
| 16 |
``` cpp
|
| 17 |
struct X {
|
|
@@ -36,8 +35,8 @@ void f(X a, Y b) {
|
|
| 36 |
}
|
| 37 |
```
|
| 38 |
|
| 39 |
— *end example*]
|
| 40 |
|
| 41 |
-
|
| 42 |
-
analogously.
|
| 43 |
|
|
|
|
| 1 |
### Increment and decrement <a id="over.inc">[[over.inc]]</a>
|
| 2 |
|
| 3 |
+
An *increment operator function* is a function named `operator++`. If
|
| 4 |
+
this function is a non-static member function with no parameters, or a
|
| 5 |
+
non-member function with one parameter, it defines the prefix increment
|
| 6 |
+
operator `++` for objects of that type. If the function is a non-static
|
| 7 |
+
member function with one parameter (which shall be of type `int`) or a
|
| 8 |
+
non-member function with two parameters (the second of which shall be of
|
| 9 |
+
type `int`), it defines the postfix increment operator `++` for objects
|
| 10 |
+
of that type. When the postfix increment is called as a result of using
|
| 11 |
+
the `++` operator, the `int` argument will have value zero.[^11]
|
|
|
|
| 12 |
|
| 13 |
[*Example 1*:
|
| 14 |
|
| 15 |
``` cpp
|
| 16 |
struct X {
|
|
|
|
| 35 |
}
|
| 36 |
```
|
| 37 |
|
| 38 |
— *end example*]
|
| 39 |
|
| 40 |
+
A *decrement operator function* is a function named `operator\dcr` and
|
| 41 |
+
is handled analogously to an increment operator function.
|
| 42 |
|