#pragma once #include template constexpr typename std::underlying_type::type underlying_cast(T e) { return static_cast::type>(e); }