tmp/tmp22zkhc0f/{from.md → to.md}
RENAMED
|
@@ -0,0 +1,62 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#### General <a id="dcl.type.general">[[dcl.type.general]]</a>
|
| 2 |
+
|
| 3 |
+
The type-specifiers are
|
| 4 |
+
|
| 5 |
+
``` bnf
|
| 6 |
+
type-specifier:
|
| 7 |
+
simple-type-specifier
|
| 8 |
+
elaborated-type-specifier
|
| 9 |
+
typename-specifier
|
| 10 |
+
cv-qualifier
|
| 11 |
+
```
|
| 12 |
+
|
| 13 |
+
``` bnf
|
| 14 |
+
type-specifier-seq:
|
| 15 |
+
type-specifier attribute-specifier-seqₒₚₜ
|
| 16 |
+
type-specifier type-specifier-seq
|
| 17 |
+
```
|
| 18 |
+
|
| 19 |
+
``` bnf
|
| 20 |
+
defining-type-specifier:
|
| 21 |
+
type-specifier
|
| 22 |
+
class-specifier
|
| 23 |
+
enum-specifier
|
| 24 |
+
```
|
| 25 |
+
|
| 26 |
+
``` bnf
|
| 27 |
+
defining-type-specifier-seq:
|
| 28 |
+
defining-type-specifier attribute-specifier-seqₒₚₜ
|
| 29 |
+
defining-type-specifier defining-type-specifier-seq
|
| 30 |
+
```
|
| 31 |
+
|
| 32 |
+
The optional *attribute-specifier-seq* in a *type-specifier-seq* or a
|
| 33 |
+
*defining-type-specifier-seq* appertains to the type denoted by the
|
| 34 |
+
preceding *type-specifier*s or *defining-type-specifier*s
|
| 35 |
+
[[dcl.meaning]]. The *attribute-specifier-seq* affects the type only for
|
| 36 |
+
the declaration it appears in, not other declarations involving the same
|
| 37 |
+
type.
|
| 38 |
+
|
| 39 |
+
As a general rule, at most one *defining-type-specifier* is allowed in
|
| 40 |
+
the complete *decl-specifier-seq* of a *declaration* or in a
|
| 41 |
+
*defining-type-specifier-seq*, and at most one *type-specifier* is
|
| 42 |
+
allowed in a *type-specifier-seq*. The only exceptions to this rule are
|
| 43 |
+
the following:
|
| 44 |
+
|
| 45 |
+
- `const` can be combined with any type specifier except itself.
|
| 46 |
+
- `volatile` can be combined with any type specifier except itself.
|
| 47 |
+
- `signed` or `unsigned` can be combined with `char`, `long`, `short`,
|
| 48 |
+
or `int`.
|
| 49 |
+
- `short` or `long` can be combined with `int`.
|
| 50 |
+
- `long` can be combined with `double`.
|
| 51 |
+
- `long` can be combined with `long`.
|
| 52 |
+
|
| 53 |
+
Except in a declaration of a constructor, destructor, or conversion
|
| 54 |
+
function, at least one *defining-type-specifier* that is not a
|
| 55 |
+
*cv-qualifier* shall appear in a complete *type-specifier-seq* or a
|
| 56 |
+
complete *decl-specifier-seq*.[^1]
|
| 57 |
+
|
| 58 |
+
[*Note 1*: *enum-specifier*s, *class-specifier*s, and
|
| 59 |
+
*typename-specifier*s are discussed in [[dcl.enum]], [[class]], and
|
| 60 |
+
[[temp.res]], respectively. The remaining *type-specifier*s are
|
| 61 |
+
discussed in the rest of [[dcl.type]]. — *end note*]
|
| 62 |
+
|