diff --git a/include/kabufuda/Util.hpp b/include/kabufuda/Util.hpp index 552500d..4fc10b0 100644 --- a/include/kabufuda/Util.hpp +++ b/include/kabufuda/Util.hpp @@ -60,6 +60,14 @@ constexpr type operator~(type key) { \ using T = std::underlying_type_t; \ return type(~static_cast(key)); \ + } \ + constexpr bool True(type key) { \ + using T = std::underlying_type_t; \ + return static_cast(key) != 0; \ + } \ + constexpr bool False(type key) { \ + using T = std::underlying_type_t; \ + return static_cast(key) == 0; \ } #endif