From Jason Turner

[class.local]

Diff to HTML by rtfpessoa

tmp/tmpg86wyhxf/{from.md → to.md} RENAMED
@@ -6,10 +6,12 @@ enclosing scope. The local class is in the scope of the enclosing scope,
6
  and has the same access to names outside the function as does the
7
  enclosing function. Declarations in a local class shall not odr-use (
8
  [[basic.def.odr]]) a variable with automatic storage duration from an
9
  enclosing scope.
10
 
 
 
11
  ``` cpp
12
  int x;
13
  void f() {
14
  static int s;
15
  int x;
@@ -27,10 +29,12 @@ void f() {
27
  }
28
 
29
  local* p = 0; // error: local not in scope
30
  ```
31
 
 
 
32
  An enclosing function has no special access to members of the local
33
  class; it obeys the usual access rules (Clause  [[class.access]]).
34
  Member functions of a local class shall be defined within their class
35
  definition, if they are defined at all.
36
 
 
6
  and has the same access to names outside the function as does the
7
  enclosing function. Declarations in a local class shall not odr-use (
8
  [[basic.def.odr]]) a variable with automatic storage duration from an
9
  enclosing scope.
10
 
11
+ [*Example 1*:
12
+
13
  ``` cpp
14
  int x;
15
  void f() {
16
  static int s;
17
  int x;
 
29
  }
30
 
31
  local* p = 0; // error: local not in scope
32
  ```
33
 
34
+ — *end example*]
35
+
36
  An enclosing function has no special access to members of the local
37
  class; it obeys the usual access rules (Clause  [[class.access]]).
38
  Member functions of a local class shall be defined within their class
39
  definition, if they are defined at all.
40