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 |
-
|
| 6 |
```
|
| 7 |
|
| 8 |
-
|
| 9 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
|
| 11 |
-
A *using-enum-declaration*
|
| 12 |
-
|
| 13 |
|
| 14 |
[*Note 1*:
|
| 15 |
|
| 16 |
-
A *using-enum-declaration* in class scope
|
| 17 |
-
named enumeration
|
| 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 };
|