Is it possible to pass anonymous enum as a function parameter? Something like that:
class Foo
{
enum
{
One,
Two,
Three
};
};
void Function( /* ??? */ e)
{
switch (e)
{
case Foo::One: // do stuff...
case Foo::Two: // ...
}
}
Solution attempt:
I was trying to determine what's the type of Foo::One by using auto and checking deduced type:
auto u = Foo::One;
But it turned out to be Foo<anonymous enum> so I can't really use that in code.