Am 16.05.2012 19:37, schrieb Ivan Godard:
> A web search comes up with a variety of syntax:
> std::underlying_type<E>::type
This is the correct way, assuming, you have header
<type_traits> included and E is an enumeration type
> std::EnumeratedType<T>::underlyingType
I don't know what this should refer to. I'm quite sure that
std::EnumeratedType had never been proposed. A member type named
'underlyingType' would also seem quite odd given the
> etc. etc. None seem to work with gcc4.6.3.
This may very well be true (assuming that you have included the right
header). In this case you should try gcc 4.7 or greater. Surely gcc 4.8
has this type trait, but also note that this additionally requires to
set the compiler flag -std=c++0x (or -std=c++11 from gcc 4.8 (?) on).
HTH & Greetings from Bremen,
Daniel Krügler