I was wondering if it is really worth it to include the type_traits
header just to get the underlying type of an enum. I'm creating a Flags class that I want to be as flexible as possible so I'm using std::underlying_type<T>::type
to get the type. I could use int
for example but what if user wants to use more than 32 flags? So my question is, could it slow down compilation times anyhow significantly when used frequently?
问问题
184 次