From Jason Turner

[dcl.ref]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpptxfxgmz/{from.md → to.md} +10 -10
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 identifier in the declaration `T` `D1` is
11
- “*derived-declarator-type-list* `T`”, then the type of the identifier of
12
- `D` is “*derived-declarator-type-list* reference to `T`”. The optional
13
- *attribute-specifier-seq* appertains to the reference type. Cv-qualified
14
- references are ill-formed except when the cv-qualifiers are introduced
15
- through the use of a *typedef-name* ([[dcl.typedef]], [[temp.param]])
16
- or *decltype-specifier* [[dcl.type.simple]], in which case the
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* ([[dcl.typedef]], [[temp.param]]) or a
111
- *decltype-specifier* [[dcl.type.simple]] 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*]
 
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*]