From Jason Turner

[dcl.stc]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpmyajpdef/{from.md → to.md} +12 -12
tmp/tmpmyajpdef/{from.md → to.md} RENAMED
@@ -15,15 +15,14 @@ At most one *storage-class-specifier* shall appear in a given
15
  `static` or `extern`. If `thread_local` appears in any declaration of a
16
  variable it shall be present in all declarations of that entity. If a
17
  *storage-class-specifier* appears in a *decl-specifier-seq*, there can
18
  be no `typedef` specifier in the same *decl-specifier-seq* and the
19
  *init-declarator-list* or *member-declarator-list* of the declaration
20
- shall not be empty (except for an anonymous union declared in a named
21
- namespace or in the global namespace, which shall be declared `static`
22
- [[class.union.anon]]). The *storage-class-specifier* applies to the name
23
- declared by each *init-declarator* in the list and not to any names
24
- declared by other specifiers.
25
 
26
  [*Note 1*: See [[temp.expl.spec]] and [[temp.explicit]] for
27
  restrictions in explicit specializations and explicit instantiations,
28
  respectively. — *end note*]
29
 
@@ -59,14 +58,15 @@ a name declared with an `extern` specifier, see  [[basic.link]].
59
 
60
  [*Note 3*: The `extern` keyword can also be used in
61
  *explicit-instantiation*s and *linkage-specification*s, but it is not a
62
  *storage-class-specifier* in such contexts. — *end note*]
63
 
64
- The linkages implied by successive declarations for a given entity shall
65
- agree. That is, within a given scope, each declaration declaring the
66
- same variable name or the same overloading of a function name shall
67
- imply the same linkage.
 
68
 
69
  [*Example 1*:
70
 
71
  ``` cpp
72
  static char* f(); // f() has internal linkage
@@ -137,11 +137,11 @@ class X {
137
  };
138
  ```
139
 
140
  — *end example*]
141
 
142
- [*Note 4*: The `mutable` specifier on a class data member nullifies a
143
  `const` specifier applied to the containing class object and permits
144
  modification of the mutable class member even though the rest of the
145
- object is const ([[basic.type.qualifier]],
146
- [[dcl.type.cv]]). — *end note*]
147
 
 
15
  `static` or `extern`. If `thread_local` appears in any declaration of a
16
  variable it shall be present in all declarations of that entity. If a
17
  *storage-class-specifier* appears in a *decl-specifier-seq*, there can
18
  be no `typedef` specifier in the same *decl-specifier-seq* and the
19
  *init-declarator-list* or *member-declarator-list* of the declaration
20
+ shall not be empty (except for an anonymous union declared in a
21
+ namespace scope [[class.union.anon]]). The *storage-class-specifier*
22
+ applies to the name declared by each *init-declarator* in the list and
23
+ not to any names declared by other specifiers.
 
24
 
25
  [*Note 1*: See [[temp.expl.spec]] and [[temp.explicit]] for
26
  restrictions in explicit specializations and explicit instantiations,
27
  respectively. — *end note*]
28
 
 
58
 
59
  [*Note 3*: The `extern` keyword can also be used in
60
  *explicit-instantiation*s and *linkage-specification*s, but it is not a
61
  *storage-class-specifier* in such contexts. — *end note*]
62
 
63
+ All declarations for a given entity shall give its name the same
64
+ linkage.
65
+
66
+ [*Note 4*: The linkage given by some declarations is affected by
67
+ previous declarations. Overloads are distinct entities. — *end note*]
68
 
69
  [*Example 1*:
70
 
71
  ``` cpp
72
  static char* f(); // f() has internal linkage
 
137
  };
138
  ```
139
 
140
  — *end example*]
141
 
142
+ [*Note 5*: The `mutable` specifier on a class data member nullifies a
143
  `const` specifier applied to the containing class object and permits
144
  modification of the mutable class member even though the rest of the
145
+ object is const
146
+ [[basic.type.qualifier]], [[dcl.type.cv]]. — *end note*]
147