From Jason Turner

[expr.ref]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpqzhni7l3/{from.md → to.md} +11 -11
tmp/tmpqzhni7l3/{from.md → to.md} RENAMED
@@ -1,19 +1,19 @@
1
  ### Class member access <a id="expr.ref">[[expr.ref]]</a>
2
 
3
  A postfix expression followed by a dot `.` or an arrow `->`, optionally
4
  followed by the keyword `template` ([[temp.names]]), and then followed
5
  by an *id-expression*, is a postfix expression. The postfix expression
6
- before the dot or arrow is evaluated;[^7] the result of that evaluation,
7
  together with the *id-expression*, determines the result of the entire
8
  postfix expression.
9
 
10
  For the first option (dot) the first expression shall have complete
11
  class type. For the second option (arrow) the first expression shall
12
  have pointer to complete class type. The expression `E1->E2` is
13
  converted to the equivalent form `(*(E1)).E2`; the remainder of
14
- [[expr.ref]] will address only the first option (dot).[^8] In either
15
  case, the *id-expression* shall name a member of the class or of one of
16
  its base classes. because the name of a class is inserted in its class
17
  scope (Clause  [[class]]), the name of a class is also considered a
18
  nested member of that class. [[basic.lookup.classref]] describes how
19
  names are looked up after the `.` and `->` operators.
@@ -33,19 +33,19 @@ rules applies.
33
  `E1.E2` is an lvalue; the expression designates the named member of
34
  the class. The type of `E1.E2` is `T`.
35
  - If `E2` is a non-static data member and the type of `E1` is “*cq1 vq1*
36
  `X`”, and the type of `E2` is “*cq2 vq2* `T`”, the expression
37
  designates the named member of the object designated by the first
38
- expression. If `E1` is an lvalue, then `E1.E2` is an lvalue; if `E1`
39
- is an xvalue, then `E1.E2` is an xvalue; otherwise, it is a prvalue.
40
- Let the notation *vq12* stand for the “union” of *vq1* and *vq2*; that
41
- is, if *vq1* or *vq2* is `volatile`, then *vq12* is `volatile`.
42
- Similarly, let the notation *cq12* stand for the “union” of *cq1* and
43
- *cq2*; that is, if *cq1* or *cq2* is `const`, then *cq12* is `const`.
44
- If `E2` is declared to be a `mutable` member, then the type of `E1.E2`
45
- is “*vq12* `T`”. If `E2` is not declared to be a `mutable` member,
46
- then the type of `E1.E2` is “*cq12* *vq12* `T`”.
47
  - If `E2` is a (possibly overloaded) member function, function overload
48
  resolution ([[over.match]]) is used to determine whether `E1.E2`
49
  refers to a static or a non-static member function.
50
  - If it refers to a static member function and the type of `E2` is
51
  “function of parameter-type-list returning `T`”, then `E1.E2` is an
 
1
  ### Class member access <a id="expr.ref">[[expr.ref]]</a>
2
 
3
  A postfix expression followed by a dot `.` or an arrow `->`, optionally
4
  followed by the keyword `template` ([[temp.names]]), and then followed
5
  by an *id-expression*, is a postfix expression. The postfix expression
6
+ before the dot or arrow is evaluated;[^6] the result of that evaluation,
7
  together with the *id-expression*, determines the result of the entire
8
  postfix expression.
9
 
10
  For the first option (dot) the first expression shall have complete
11
  class type. For the second option (arrow) the first expression shall
12
  have pointer to complete class type. The expression `E1->E2` is
13
  converted to the equivalent form `(*(E1)).E2`; the remainder of
14
+ [[expr.ref]] will address only the first option (dot).[^7] In either
15
  case, the *id-expression* shall name a member of the class or of one of
16
  its base classes. because the name of a class is inserted in its class
17
  scope (Clause  [[class]]), the name of a class is also considered a
18
  nested member of that class. [[basic.lookup.classref]] describes how
19
  names are looked up after the `.` and `->` operators.
 
33
  `E1.E2` is an lvalue; the expression designates the named member of
34
  the class. The type of `E1.E2` is `T`.
35
  - If `E2` is a non-static data member and the type of `E1` is “*cq1 vq1*
36
  `X`”, and the type of `E2` is “*cq2 vq2* `T`”, the expression
37
  designates the named member of the object designated by the first
38
+ expression. If `E1` is an lvalue, then `E1.E2` is an lvalue; otherwise
39
+ `E1.E2` is an xvalue. Let the notation *vq12* stand for the “union” of
40
+ *vq1* and *vq2*; that is, if *vq1* or *vq2* is `volatile`, then *vq12*
41
+ is `volatile`. Similarly, let the notation *cq12* stand for the
42
+ “union” of *cq1* and *cq2*; that is, if *cq1* or *cq2* is `const`,
43
+ then *cq12* is `const`. If `E2` is declared to be a `mutable` member,
44
+ then the type of `E1.E2` is “*vq12* `T`”. If `E2` is not declared to
45
+ be a `mutable` member, then the type of `E1.E2` is “*cq12* *vq12*
46
+ `T`”.
47
  - If `E2` is a (possibly overloaded) member function, function overload
48
  resolution ([[over.match]]) is used to determine whether `E1.E2`
49
  refers to a static or a non-static member function.
50
  - If it refers to a static member function and the type of `E2` is
51
  “function of parameter-type-list returning `T`”, then `E1.E2` is an