'declare and using enum class and using in one statement
When using scoped enums I stumbled over some syntax which is accepted by Microsoft, but not by clang or gcc:
using enum class Color {
RED, GREEN, BLUE
};
(https://godbolt.org/z/arPcYME7s)
I think that could be a nice shortcut to save an extra using enum statement.
When looking for some documentation on this I couldn't find any, https://en.cppreference.com/w/cpp/language/enum doesn't mention this syntax, also the Microsoft documentation doesn't know about this.
My question is, is that syntax going to be allowed in some future version of C++, so Microsoft implemented it on purpose, or should this considered as a compiler bug?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
