memgraph/utils/underlying_cast.hpp
Dominik Tomičević 6930b27d1f updated properties
2015-10-13 20:17:45 +02:00

13 lines
283 B
C++

#ifndef MEMGRAPH_UTILS_UNDERLYING_CAST_HPP
#define MEMGRAPH_UTILS_UNDERLYING_CAST_HPP
#include <type_traits>
template <typename T>
constexpr typename std::underlying_type<T>::type underlying_cast(T e) {
return static_cast<typename std::underlying_type<T>::type>(e);
}
#endif