A point from N3290 draft ISO Standard, §3.4.1/12:
During the lookup of a name used in the constant-expression of an enumerator-definition, previously declared enumerators of the enumeration are visible and hide the names of entities declared in the block, class, or namespace scopes containing the enum-specifier.
This is the added new point, can any one explain this..point with an example (in terms of an example) please?
Let's just have some code:
struct X {};
enum Foo
{
X = 0,
Y,
Z = X // X refers to the enum, not the type
};
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With