memgraph/utils/underlying_cast.hpp
2015-12-07 21:51:55 +01:00

9 lines
201 B
C++

#pragma once
#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);
}