tmp/tmpdbvzt9us/{from.md → to.md}
RENAMED
|
@@ -16,63 +16,42 @@ that can be converted to a type appropriate for the operator. Also note
|
|
| 16 |
that some of the candidate operator functions given in this subclause
|
| 17 |
are more permissive than the built-in operators themselves. As described
|
| 18 |
in [[over.match.oper]], after a built-in operator is selected by
|
| 19 |
overload resolution the expression is subject to the requirements for
|
| 20 |
the built-in operator given in [[expr.compound]], and therefore to any
|
| 21 |
-
additional semantic constraints given there.
|
| 22 |
-
|
| 23 |
-
operator function
|
| 24 |
-
included in the set of candidate functions. — *end note*]
|
| 25 |
|
| 26 |
In this subclause, the term *promoted integral type* is used to refer to
|
| 27 |
-
those integral types which are preserved by integral
|
| 28 |
-
[[conv.prom]] (including e.g. `int` and `long` but excluding
|
| 29 |
-
`char`).
|
| 30 |
|
| 31 |
[*Note 2*: In all cases where a promoted integral type is required, an
|
| 32 |
operand of unscoped enumeration type will be acceptable by way of the
|
| 33 |
integral promotions. — *end note*]
|
| 34 |
|
| 35 |
In the remainder of this subclause, *vq* represents either `volatile` or
|
| 36 |
no cv-qualifier.
|
| 37 |
|
| 38 |
-
For every pair (`T`, *vq*), where `T` is
|
| 39 |
-
`bool`
|
|
|
|
|
|
|
| 40 |
|
| 41 |
``` cpp
|
| 42 |
vq T& operator++(vq T&);
|
| 43 |
T operator++(vq T&, int);
|
| 44 |
-
```
|
| 45 |
-
|
| 46 |
-
For every pair (`T`, *vq*), where `T` is an arithmetic type other than
|
| 47 |
-
`bool`, there exist candidate operator functions of the form
|
| 48 |
-
|
| 49 |
-
``` cpp
|
| 50 |
vq T& operator--(vq T&);
|
| 51 |
T operator--(vq T&, int);
|
| 52 |
```
|
| 53 |
|
| 54 |
-
For every
|
| 55 |
-
|
| 56 |
-
the form
|
| 57 |
-
|
| 58 |
-
``` cpp
|
| 59 |
-
T*vq& operator++(T*vq&);
|
| 60 |
-
T*vq& operator--(T*vq&);
|
| 61 |
-
T* operator++(T*vq&, int);
|
| 62 |
-
T* operator--(T*vq&, int);
|
| 63 |
-
```
|
| 64 |
-
|
| 65 |
-
For every cv-qualified or cv-unqualified object type `T`, there exist
|
| 66 |
-
candidate operator functions of the form
|
| 67 |
-
|
| 68 |
-
``` cpp
|
| 69 |
-
T& operator*(T*);
|
| 70 |
-
```
|
| 71 |
-
|
| 72 |
-
For every function type `T` that does not have cv-qualifiers or a
|
| 73 |
-
*ref-qualifier*, there exist candidate operator functions of the form
|
| 74 |
|
| 75 |
``` cpp
|
| 76 |
T& operator*(T*);
|
| 77 |
```
|
| 78 |
|
|
@@ -80,12 +59,12 @@ For every type `T` there exist candidate operator functions of the form
|
|
| 80 |
|
| 81 |
``` cpp
|
| 82 |
T* operator+(T*);
|
| 83 |
```
|
| 84 |
|
| 85 |
-
For every floating-point or promoted integral type `T`,
|
| 86 |
-
candidate operator functions of the form
|
| 87 |
|
| 88 |
``` cpp
|
| 89 |
T operator+(T);
|
| 90 |
T operator-(T);
|
| 91 |
```
|
|
|
|
| 16 |
that some of the candidate operator functions given in this subclause
|
| 17 |
are more permissive than the built-in operators themselves. As described
|
| 18 |
in [[over.match.oper]], after a built-in operator is selected by
|
| 19 |
overload resolution the expression is subject to the requirements for
|
| 20 |
the built-in operator given in [[expr.compound]], and therefore to any
|
| 21 |
+
additional semantic constraints given there. In some cases, user-written
|
| 22 |
+
candidates with the same name and parameter types as a built-in
|
| 23 |
+
candidate operator function cause the built-in operator function to not
|
| 24 |
+
be included in the set of candidate functions. — *end note*]
|
| 25 |
|
| 26 |
In this subclause, the term *promoted integral type* is used to refer to
|
| 27 |
+
those cv-unqualified integral types which are preserved by integral
|
| 28 |
+
promotion [[conv.prom]] (including e.g. `int` and `long` but excluding
|
| 29 |
+
e.g. `char`).
|
| 30 |
|
| 31 |
[*Note 2*: In all cases where a promoted integral type is required, an
|
| 32 |
operand of unscoped enumeration type will be acceptable by way of the
|
| 33 |
integral promotions. — *end note*]
|
| 34 |
|
| 35 |
In the remainder of this subclause, *vq* represents either `volatile` or
|
| 36 |
no cv-qualifier.
|
| 37 |
|
| 38 |
+
For every pair (`T`, *vq*), where `T` is a cv-unqualified arithmetic
|
| 39 |
+
type other than `bool` or a cv-unqualified pointer to (possibly
|
| 40 |
+
cv-qualified) object type, there exist candidate operator functions of
|
| 41 |
+
the form
|
| 42 |
|
| 43 |
``` cpp
|
| 44 |
vq T& operator++(vq T&);
|
| 45 |
T operator++(vq T&, int);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 46 |
vq T& operator--(vq T&);
|
| 47 |
T operator--(vq T&, int);
|
| 48 |
```
|
| 49 |
|
| 50 |
+
For every (possibly cv-qualified) object type `T` and for every function
|
| 51 |
+
type `T` that has neither *cv-qualifier*s nor a *ref-qualifier*, there
|
| 52 |
+
exist candidate operator functions of the form
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 53 |
|
| 54 |
``` cpp
|
| 55 |
T& operator*(T*);
|
| 56 |
```
|
| 57 |
|
|
|
|
| 59 |
|
| 60 |
``` cpp
|
| 61 |
T* operator+(T*);
|
| 62 |
```
|
| 63 |
|
| 64 |
+
For every cv-unqualified floating-point or promoted integral type `T`,
|
| 65 |
+
there exist candidate operator functions of the form
|
| 66 |
|
| 67 |
``` cpp
|
| 68 |
T operator+(T);
|
| 69 |
T operator-(T);
|
| 70 |
```
|