memgraph/include/utils/underlying_cast.hpp
2016-08-10 09:39:02 +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);
}