diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2022-10-26 21:47:50 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2022-10-26 21:59:08 +0200 |
commit | bad83b7e5ed3a2e8bd5f263b2f420386471c523e (patch) | |
tree | ee99c11546928a581b4fc6c2d75a798a2506194c /compat | |
parent | 15e25836d4097c0179f6ed18d91611e3a0250664 (diff) |
krap
Diffstat (limited to 'compat')
-rw-r--r-- | compat/enum-bitset.hpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/compat/enum-bitset.hpp b/compat/enum-bitset.hpp index 95c82ff7..1365b3fb 100644 --- a/compat/enum-bitset.hpp +++ b/compat/enum-bitset.hpp @@ -4,7 +4,9 @@ namespace floormat { template<typename Enum> +requires std::is_enum_v<Enum> struct enum_bitset : std::bitset<(std::size_t)Enum::MAX> { + using type = Enum; static_assert(std::is_same_v<std::size_t, std::common_type_t<std::size_t, std::underlying_type_t<Enum>>>); static_assert(std::is_same_v<Enum, std::decay_t<Enum>>); using std::bitset<(std::size_t)Enum::MAX>::bitset; |