tmp/tmp8ckxiga8/{from.md → to.md}
RENAMED
|
@@ -14,17 +14,17 @@ attribute-specifier:
|
|
| 14 |
alignment-specifier
|
| 15 |
```
|
| 16 |
|
| 17 |
``` bnf
|
| 18 |
alignment-specifier:
|
| 19 |
-
|
| 20 |
-
|
| 21 |
```
|
| 22 |
|
| 23 |
``` bnf
|
| 24 |
attribute-using-prefix:
|
| 25 |
-
|
| 26 |
```
|
| 27 |
|
| 28 |
``` bnf
|
| 29 |
attribute-list:
|
| 30 |
attributeₒₚₜ
|
|
@@ -100,45 +100,50 @@ contain an *attribute-scoped-token* and every *attribute-token* in that
|
|
| 100 |
[*Note 2*: For each individual attribute, the form of the
|
| 101 |
*balanced-token-seq* will be specified. — *end note*]
|
| 102 |
|
| 103 |
In an *attribute-list*, an ellipsis may appear only if that
|
| 104 |
*attribute*’s specification permits it. An *attribute* followed by an
|
| 105 |
-
ellipsis is a pack expansion
|
| 106 |
-
|
| 107 |
-
|
| 108 |
-
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
*attribute-argument-clause* (if any).
|
| 115 |
|
| 116 |
Each *attribute-specifier-seq* is said to *appertain* to some entity or
|
| 117 |
-
statement, identified by the syntactic context where it appears (
|
| 118 |
-
[[stmt.stmt]],
|
| 119 |
*attribute-specifier-seq* that appertains to some entity or statement
|
| 120 |
contains an *attribute* or *alignment-specifier* that is not allowed to
|
| 121 |
apply to that entity or statement, the program is ill-formed. If an
|
| 122 |
-
*attribute-specifier-seq* appertains to a friend declaration
|
| 123 |
-
[[class.friend]]
|
| 124 |
-
|
| 125 |
-
[
|
|
|
|
| 126 |
|
| 127 |
For an *attribute-token* (including an *attribute-scoped-token*) not
|
| 128 |
-
specified in this
|
| 129 |
-
|
| 130 |
-
|
| 131 |
|
| 132 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 133 |
*attribute-namespace* in an *attribute-scoped-token*. — *end note*]
|
| 134 |
|
| 135 |
Two consecutive left square bracket tokens shall appear only when
|
| 136 |
introducing an *attribute-specifier* or within the *balanced-token-seq*
|
| 137 |
of an *attribute-argument-clause*.
|
| 138 |
|
| 139 |
-
[*Note
|
| 140 |
*attribute-specifier* is not allowed, the program is ill-formed even if
|
| 141 |
the brackets match an alternative grammar production. — *end note*]
|
| 142 |
|
| 143 |
[*Example 2*:
|
| 144 |
|
|
|
|
| 14 |
alignment-specifier
|
| 15 |
```
|
| 16 |
|
| 17 |
``` bnf
|
| 18 |
alignment-specifier:
|
| 19 |
+
alignas '(' type-id '...'ₒₚₜ ')'
|
| 20 |
+
alignas '(' constant-expression '...'ₒₚₜ ')'
|
| 21 |
```
|
| 22 |
|
| 23 |
``` bnf
|
| 24 |
attribute-using-prefix:
|
| 25 |
+
using attribute-namespace ':'
|
| 26 |
```
|
| 27 |
|
| 28 |
``` bnf
|
| 29 |
attribute-list:
|
| 30 |
attributeₒₚₜ
|
|
|
|
| 100 |
[*Note 2*: For each individual attribute, the form of the
|
| 101 |
*balanced-token-seq* will be specified. — *end note*]
|
| 102 |
|
| 103 |
In an *attribute-list*, an ellipsis may appear only if that
|
| 104 |
*attribute*’s specification permits it. An *attribute* followed by an
|
| 105 |
+
ellipsis is a pack expansion [[temp.variadic]]. An *attribute-specifier*
|
| 106 |
+
that contains no *attribute*s has no effect. The order in which the
|
| 107 |
+
*attribute-token*s appear in an *attribute-list* is not significant. If
|
| 108 |
+
a keyword [[lex.key]] or an alternative token [[lex.digraph]] that
|
| 109 |
+
satisfies the syntactic requirements of an *identifier* [[lex.name]] is
|
| 110 |
+
contained in an *attribute-token*, it is considered an identifier. No
|
| 111 |
+
name lookup [[basic.lookup]] is performed on any of the identifiers
|
| 112 |
+
contained in an *attribute-token*. The *attribute-token* determines
|
| 113 |
+
additional requirements on the *attribute-argument-clause* (if any).
|
|
|
|
| 114 |
|
| 115 |
Each *attribute-specifier-seq* is said to *appertain* to some entity or
|
| 116 |
+
statement, identified by the syntactic context where it appears (
|
| 117 |
+
[[stmt.stmt]], [[dcl.dcl]], [[dcl.decl]]). If an
|
| 118 |
*attribute-specifier-seq* that appertains to some entity or statement
|
| 119 |
contains an *attribute* or *alignment-specifier* that is not allowed to
|
| 120 |
apply to that entity or statement, the program is ill-formed. If an
|
| 121 |
+
*attribute-specifier-seq* appertains to a friend declaration
|
| 122 |
+
[[class.friend]], that declaration shall be a definition.
|
| 123 |
+
|
| 124 |
+
[*Note 3*: An *attribute-specifier-seq* cannot appeartain to an
|
| 125 |
+
explicit instantiation [[temp.explicit]]. — *end note*]
|
| 126 |
|
| 127 |
For an *attribute-token* (including an *attribute-scoped-token*) not
|
| 128 |
+
specified in this document, the behavior is *implementation-defined*.
|
| 129 |
+
Any *attribute-token* that is not recognized by the implementation is
|
| 130 |
+
ignored. An *attribute-token* is reserved for future standardization if
|
| 131 |
|
| 132 |
+
- it is not an *attribute-scoped-token* and is not specified in this
|
| 133 |
+
document, or
|
| 134 |
+
- it is an *attribute-scoped-token* and its *attribute-namespace* is
|
| 135 |
+
`std` followed by zero or more digits.
|
| 136 |
+
|
| 137 |
+
[*Note 4*: Each implementation should choose a distinctive name for the
|
| 138 |
*attribute-namespace* in an *attribute-scoped-token*. — *end note*]
|
| 139 |
|
| 140 |
Two consecutive left square bracket tokens shall appear only when
|
| 141 |
introducing an *attribute-specifier* or within the *balanced-token-seq*
|
| 142 |
of an *attribute-argument-clause*.
|
| 143 |
|
| 144 |
+
[*Note 5*: If two consecutive left square brackets appear where an
|
| 145 |
*attribute-specifier* is not allowed, the program is ill-formed even if
|
| 146 |
the brackets match an alternative grammar production. — *end note*]
|
| 147 |
|
| 148 |
[*Example 2*:
|
| 149 |
|