From Jason Turner

[enum.udecl]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpp_93uvio/{from.md → to.md} +15 -8
tmp/tmpp_93uvio/{from.md → to.md} RENAMED
@@ -1,23 +1,30 @@
1
  ### The `using enum` declaration <a id="enum.udecl">[[enum.udecl]]</a>
2
 
3
  ``` bnf
4
  using-enum-declaration:
5
- 'using' elaborated-enum-specifier ';'
6
  ```
7
 
8
- The *elaborated-enum-specifier* shall not name a dependent type and the
9
- type shall have a reachable *enum-specifier*.
 
 
 
 
 
 
 
 
10
 
11
- A *using-enum-declaration* introduces the enumerator names of the named
12
- enumeration as if by a *using-declaration* for each enumerator.
13
 
14
  [*Note 1*:
15
 
16
- A *using-enum-declaration* in class scope adds the enumerators of the
17
- named enumeration as members to the scope. This means they are
18
- accessible for member lookup.
19
 
20
  [*Example 1*:
21
 
22
  ``` cpp
23
  enum class fruit { orange, apple };
 
1
  ### The `using enum` declaration <a id="enum.udecl">[[enum.udecl]]</a>
2
 
3
  ``` bnf
4
  using-enum-declaration:
5
+ using enum using-enum-declarator ';'
6
  ```
7
 
8
+ ``` bnf
9
+ using-enum-declarator:
10
+ nested-name-specifierₒₚₜ identifier
11
+ nested-name-specifierₒₚₜ simple-template-id
12
+ ```
13
+
14
+ A *using-enum-declarator* names the set of declarations found by lookup
15
+ [[basic.lookup.unqual]], [[basic.lookup.qual]] for the
16
+ *using-enum-declarator*. The *using-enum-declarator* shall designate a
17
+ non-dependent type with a reachable *enum-specifier*.
18
 
19
+ A *using-enum-declaration* is equivalent to a *using-declaration* for
20
+ each enumerator.
21
 
22
  [*Note 1*:
23
 
24
+ A *using-enum-declaration* in class scope makes the enumerators of the
25
+ named enumeration available via member lookup.
 
26
 
27
  [*Example 1*:
28
 
29
  ``` cpp
30
  enum class fruit { orange, apple };