From Jason Turner

[conv.mem]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpawbsdp4f/{from.md → to.md} +21 -22
tmp/tmpawbsdp4f/{from.md → to.md} RENAMED
@@ -1,29 +1,28 @@
1
- ## Pointer to member conversions <a id="conv.mem">[[conv.mem]]</a>
2
 
3
- A null pointer constant ([[conv.ptr]]) can be converted to a pointer to
4
- member type; the result is the *null member pointer value* of that type
5
- and is distinguishable from any pointer to member not created from a
6
- null pointer constant. Such a conversion is called a *null member
7
  pointer conversion*. Two null member pointer values of the same type
8
  shall compare equal. The conversion of a null pointer constant to a
9
  pointer to member of cv-qualified type is a single conversion, and not
10
- the sequence of a pointer to member conversion followed by a
11
- qualification conversion ([[conv.qual]]).
12
 
13
- A prvalue of type “pointer to member of `B` of type *cv* `T`”, where `B`
14
  is a class type, can be converted to a prvalue of type “pointer to
15
- member of `D` of type *cv* `T`”, where `D` is a derived class (Clause 
16
- [[class.derived]]) of `B`. If `B` is an inaccessible (Clause 
17
- [[class.access]]), ambiguous ([[class.member.lookup]]), or virtual (
18
- [[class.mi]]) base class of `D`, or a base class of a virtual base class
19
- of `D`, a program that necessitates this conversion is ill-formed. The
20
- result of the conversion refers to the same member as the pointer to
21
- member before the conversion took place, but it refers to the base class
22
- member as if it were a member of the derived class. The result refers to
23
- the member in `D`’s instance of `B`. Since the result has type “pointer
24
- to member of `D` of type *cv* `T`”, indirection through it with a `D`
25
- object is valid. The result is the same as if indirecting through the
26
- pointer to member of `B` with the `B` subobject of `D`. The null member
27
- pointer value is converted to the null member pointer value of the
28
- destination type.[^5]
29
 
 
1
+ ### Pointer-to-member conversions <a id="conv.mem">[[conv.mem]]</a>
2
 
3
+ A null pointer constant [[conv.ptr]] can be converted to a
4
+ pointer-to-member type; the result is the *null member pointer value* of
5
+ that type and is distinguishable from any pointer to member not created
6
+ from a null pointer constant. Such a conversion is called a *null member
7
  pointer conversion*. Two null member pointer values of the same type
8
  shall compare equal. The conversion of a null pointer constant to a
9
  pointer to member of cv-qualified type is a single conversion, and not
10
+ the sequence of a pointer-to-member conversion followed by a
11
+ qualification conversion [[conv.qual]].
12
 
13
+ A prvalue of type “pointer to member of `B` of type cv `T`”, where `B`
14
  is a class type, can be converted to a prvalue of type “pointer to
15
+ member of `D` of type cv `T`”, where `D` is a complete class derived
16
+ [[class.derived]] from `B`. If `B` is an inaccessible [[class.access]],
17
+ ambiguous [[class.member.lookup]], or virtual [[class.mi]] base class of
18
+ `D`, or a base class of a virtual base class of `D`, a program that
19
+ necessitates this conversion is ill-formed. The result of the conversion
20
+ refers to the same member as the pointer to member before the conversion
21
+ took place, but it refers to the base class member as if it were a
22
+ member of the derived class. The result refers to the member in `D`’s
23
+ instance of `B`. Since the result has type “pointer to member of `D` of
24
+ type cv `T`”, indirection through it with a `D` object is valid. The
25
+ result is the same as if indirecting through the pointer to member of
26
+ `B` with the `B` subobject of `D`. The null member pointer value is
27
+ converted to the null member pointer value of the destination type.[^8]
 
28