I have a variable declared as:
enum class FooEnum: uint64_t {}
and I would like to cast to its base-type, but I don\'t want to hardcode the
You can use this:
The doc says,
Defines a member
typedeftype of type that is the underlying type for the enumeration T.
So you should be able to do this:
#include //include this
FooEnum myEnum;
auto pointer = static_cast::type*>(&myEnum);