to_underlying.hpp
1 #ifndef PRE_ENUMS_TO_UNDERLYING_HPP
2 #define PRE_ENUMS_TO_UNDERLYING_HPP
3 
4 #include <type_traits>
5 
6 namespace pre { namespace enums {
7 
11  template <typename E>
12  typename std::underlying_type<E>::type to_underlying(E e) {
13  return static_cast<typename std::underlying_type<E>::type>(e);
14  }
15 
16 }}
17 
18 #endif
std::underlying_type< E >::type to_underlying(E e)
Definition: to_underlying.hpp:12