From Jason Turner

[expr.mptr.oper]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpddnao6s9/{from.md → to.md} +10 -11
tmp/tmpddnao6s9/{from.md → to.md} RENAMED
@@ -8,21 +8,20 @@ pm-expression:
8
  pm-expression '.*' cast-expression
9
  pm-expression '->*' cast-expression
10
  ```
11
 
12
  The binary operator `.*` binds its second operand, which shall be of
13
- type “pointer to member of `T`” (where `T` is a completely-defined class
14
- type) to its first operand, which shall be of class `T` or of a class of
15
- which `T` is an unambiguous and accessible base class. The result is an
16
- object or a function of the type specified by the second operand.
17
 
18
  The binary operator `->*` binds its second operand, which shall be of
19
- type “pointer to member of `T`” (where `T` is a completely-defined class
20
- type) to its first operand, which shall be of type “pointer to `T` or
21
- “pointer to a class of which `T` is an unambiguous and accessible base
22
- class.” The expression `E1->*E2` is converted into the equivalent form
23
- `(*(E1)).*E2`.
24
 
25
  Abbreviating *pm-expression*`.*`*cast-expression* as `E1.*E2`, `E1` is
26
  called the *object expression*. If the dynamic type of `E1` does not
27
  contain the member to which `E2` refers, the behavior is undefined.
28
 
@@ -58,11 +57,11 @@ pointed to by `ptr_to_obj`. In a `.*` expression whose object expression
58
  is an rvalue, the program is ill-formed if the second operand is a
59
  pointer to member function with *ref-qualifier* `&`. In a `.*`
60
  expression whose object expression is an lvalue, the program is
61
  ill-formed if the second operand is a pointer to member function with
62
  *ref-qualifier* `&&`. The result of a `.*` expression whose second
63
- operand is a pointer to a data member is of the same value category (
64
- [[basic.lval]]) as its first operand. The result of a `.*` expression
65
  whose second operand is a pointer to a member function is a prvalue. If
66
  the second operand is the null pointer to member value ([[conv.mem]]),
67
  the behavior is undefined.
68
 
 
8
  pm-expression '.*' cast-expression
9
  pm-expression '->*' cast-expression
10
  ```
11
 
12
  The binary operator `.*` binds its second operand, which shall be of
13
+ type “pointer to member of `T`” to its first operand, which shall be of
14
+ class `T` or of a class of which `T` is an unambiguous and accessible
15
+ base class. The result is an object or a function of the type specified
16
+ by the second operand.
17
 
18
  The binary operator `->*` binds its second operand, which shall be of
19
+ type “pointer to member of `T`” to its first operand, which shall be of
20
+ type “pointer to `T`” or “pointer to a class of which `T` is an
21
+ unambiguous and accessible base class.” The expression `E1->*E2` is
22
+ converted into the equivalent form `(*(E1)).*E2`.
 
23
 
24
  Abbreviating *pm-expression*`.*`*cast-expression* as `E1.*E2`, `E1` is
25
  called the *object expression*. If the dynamic type of `E1` does not
26
  contain the member to which `E2` refers, the behavior is undefined.
27
 
 
57
  is an rvalue, the program is ill-formed if the second operand is a
58
  pointer to member function with *ref-qualifier* `&`. In a `.*`
59
  expression whose object expression is an lvalue, the program is
60
  ill-formed if the second operand is a pointer to member function with
61
  *ref-qualifier* `&&`. The result of a `.*` expression whose second
62
+ operand is a pointer to a data member is an lvalue if the first operand
63
+ is an lvalue and an xvalue otherwise. The result of a `.*` expression
64
  whose second operand is a pointer to a member function is a prvalue. If
65
  the second operand is the null pointer to member value ([[conv.mem]]),
66
  the behavior is undefined.
67