With a declaration such as:
enum DrawBoldMode : unsigned { DBM_NONE = 0, DBM_ITEM = 1<<0, // bold just the nearest
It should be available as std::underlying_type::type. However, my compiler (GCC 4.6.1) doesn't seem to implement that.
std::underlying_type::type
I think it's impossible to implement it with templates, but I could be wrong about that.