From Jason Turner

[basic.scope]

Diff to HTML by rtfpessoa

tmp/tmp6lzimh8b/{from.md → to.md} RENAMED
@@ -71,12 +71,12 @@ The name lookup rules are summarized in  [[basic.lookup]].
71
  The *point of declaration* for a name is immediately after its complete
72
  declarator (Clause  [[dcl.decl]]) and before its *initializer* (if any),
73
  except as noted below.
74
 
75
  ``` cpp
76
- int x = 12;
77
- { int x = x; }
78
  ```
79
 
80
  Here the second `x` is initialized with its own (indeterminate) value.
81
 
82
  a name from an outer scope remains visible up to the point of
@@ -96,10 +96,14 @@ The point of declaration for an enumeration is immediately after the
96
  *identifier* (if any) in either its *enum-specifier* ([[dcl.enum]]) or
97
  its first *opaque-enum-declaration* ([[dcl.enum]]), whichever comes
98
  first. The point of declaration of an alias or alias template
99
  immediately follows the *type-id* to which the alias refers.
100
 
 
 
 
 
101
  The point of declaration for an enumerator is immediately after its
102
  *enumerator-definition*.
103
 
104
  ``` cpp
105
  const int x = 12;
@@ -171,11 +175,11 @@ block scope and variable declarations with the `extern` specifier at
171
  block scope refer to declarations that are members of an enclosing
172
  namespace, but they do not introduce new names into that scope.
173
 
174
  For point of instantiation of a template, see  [[temp.point]].
175
 
176
- ### Block scope <a id="basic.scope.local">[[basic.scope.local]]</a>
177
 
178
  A name declared in a block ([[stmt.block]]) is local to that block; it
179
  has *block scope*. Its potential scope begins at its point of
180
  declaration ([[basic.scope.pdecl]]) and ends at the end of its block. A
181
  variable declared at block scope is a *local variable*.
@@ -267,12 +271,12 @@ namespace in a *using-directive;* see  [[namespace.qual]].
267
  The outermost declarative region of a translation unit is also a
268
  namespace, called the *global namespace*. A name declared in the global
269
  namespace has *global namespace scope* (also called *global scope*). The
270
  potential scope of such a name begins at its point of declaration (
271
  [[basic.scope.pdecl]]) and ends at the end of the translation unit that
272
- is its declarative region. Names with global namespace scope are said to
273
- be *global name*.
274
 
275
  ### Class scope <a id="basic.scope.class">[[basic.scope.class]]</a>
276
 
277
  The following rules describe the scope of names declared in classes.
278
 
 
71
  The *point of declaration* for a name is immediately after its complete
72
  declarator (Clause  [[dcl.decl]]) and before its *initializer* (if any),
73
  except as noted below.
74
 
75
  ``` cpp
76
+ unsigned char x = 12;
77
+ { unsigned char x = x; }
78
  ```
79
 
80
  Here the second `x` is initialized with its own (indeterminate) value.
81
 
82
  a name from an outer scope remains visible up to the point of
 
96
  *identifier* (if any) in either its *enum-specifier* ([[dcl.enum]]) or
97
  its first *opaque-enum-declaration* ([[dcl.enum]]), whichever comes
98
  first. The point of declaration of an alias or alias template
99
  immediately follows the *type-id* to which the alias refers.
100
 
101
+ The point of declaration of a *using-declaration* that does not name a
102
+ constructor is immediately after the *using-declaration* (
103
+ [[namespace.udecl]]).
104
+
105
  The point of declaration for an enumerator is immediately after its
106
  *enumerator-definition*.
107
 
108
  ``` cpp
109
  const int x = 12;
 
175
  block scope refer to declarations that are members of an enclosing
176
  namespace, but they do not introduce new names into that scope.
177
 
178
  For point of instantiation of a template, see  [[temp.point]].
179
 
180
+ ### Block scope <a id="basic.scope.block">[[basic.scope.block]]</a>
181
 
182
  A name declared in a block ([[stmt.block]]) is local to that block; it
183
  has *block scope*. Its potential scope begins at its point of
184
  declaration ([[basic.scope.pdecl]]) and ends at the end of its block. A
185
  variable declared at block scope is a *local variable*.
 
271
  The outermost declarative region of a translation unit is also a
272
  namespace, called the *global namespace*. A name declared in the global
273
  namespace has *global namespace scope* (also called *global scope*). The
274
  potential scope of such a name begins at its point of declaration (
275
  [[basic.scope.pdecl]]) and ends at the end of the translation unit that
276
+ is its declarative region. A name with global namespace scope is said to
277
+ be a *global name*.
278
 
279
  ### Class scope <a id="basic.scope.class">[[basic.scope.class]]</a>
280
 
281
  The following rules describe the scope of names declared in classes.
282