tmp/tmpptxfxgmz/{from.md → to.md}
RENAMED
|
@@ -5,18 +5,18 @@ In a declaration `T` `D` where `D` has either of the forms
|
|
| 5 |
``` bnf
|
| 6 |
'&' attribute-specifier-seqₒₚₜ 'D1'
|
| 7 |
'&&' attribute-specifier-seqₒₚₜ 'D1'
|
| 8 |
```
|
| 9 |
|
| 10 |
-
and the type of the
|
| 11 |
-
“*derived-declarator-type-list* `T`”,
|
| 12 |
-
`D` is “*derived-declarator-type-list* reference to
|
| 13 |
-
*attribute-specifier-seq* appertains to the reference
|
| 14 |
-
references are ill-formed except when the
|
| 15 |
-
through the use of a *typedef-name*
|
| 16 |
-
|
| 17 |
-
cv-qualifiers are ignored.
|
| 18 |
|
| 19 |
[*Example 1*:
|
| 20 |
|
| 21 |
``` cpp
|
| 22 |
typedef int& A;
|
|
@@ -105,12 +105,12 @@ well-defined program, because the only way to create such a reference
|
|
| 105 |
would be to bind it to the “object” obtained by indirection through a
|
| 106 |
null pointer, which causes undefined behavior. As described in
|
| 107 |
[[class.bit]], a reference cannot be bound directly to a
|
| 108 |
bit-field. — *end note*]
|
| 109 |
|
| 110 |
-
If a *typedef-name*
|
| 111 |
-
*decltype-specifier* [[dcl.type.
|
| 112 |
reference to a type `T`, an attempt to create the type “lvalue reference
|
| 113 |
to cv `TR`” creates the type “lvalue reference to `T`”, while an attempt
|
| 114 |
to create the type “rvalue reference to cv `TR`” creates the type `TR`.
|
| 115 |
|
| 116 |
[*Note 3*: This rule is known as reference collapsing. — *end note*]
|
|
|
|
| 5 |
``` bnf
|
| 6 |
'&' attribute-specifier-seqₒₚₜ 'D1'
|
| 7 |
'&&' attribute-specifier-seqₒₚₜ 'D1'
|
| 8 |
```
|
| 9 |
|
| 10 |
+
and the type of the contained *declarator-id* in the declaration `T`
|
| 11 |
+
`D1` is “*derived-declarator-type-list* `T`”, the type of the
|
| 12 |
+
*declarator-id* in `D` is “*derived-declarator-type-list* reference to
|
| 13 |
+
`T`”. The optional *attribute-specifier-seq* appertains to the reference
|
| 14 |
+
type. Cv-qualified references are ill-formed except when the
|
| 15 |
+
cv-qualifiers are introduced through the use of a *typedef-name*
|
| 16 |
+
[[dcl.typedef]], [[temp.param]] or *decltype-specifier*
|
| 17 |
+
[[dcl.type.decltype]], in which case the cv-qualifiers are ignored.
|
| 18 |
|
| 19 |
[*Example 1*:
|
| 20 |
|
| 21 |
``` cpp
|
| 22 |
typedef int& A;
|
|
|
|
| 105 |
would be to bind it to the “object” obtained by indirection through a
|
| 106 |
null pointer, which causes undefined behavior. As described in
|
| 107 |
[[class.bit]], a reference cannot be bound directly to a
|
| 108 |
bit-field. — *end note*]
|
| 109 |
|
| 110 |
+
If a *typedef-name* [[dcl.typedef]], [[temp.param]] or a
|
| 111 |
+
*decltype-specifier* [[dcl.type.decltype]] denotes a type `TR` that is a
|
| 112 |
reference to a type `T`, an attempt to create the type “lvalue reference
|
| 113 |
to cv `TR`” creates the type “lvalue reference to `T`”, while an attempt
|
| 114 |
to create the type “rvalue reference to cv `TR`” creates the type `TR`.
|
| 115 |
|
| 116 |
[*Note 3*: This rule is known as reference collapsing. — *end note*]
|