draconisplusplus/include/rfl/internal/enums/is_scoped_enum.hpp

21 lines
459 B
C++
Raw Normal View History

2024-05-31 22:59:00 -04:00
#ifndef RFL_INTERNAL_ENUMS_IS_SCOPED_ENUM_HPP_
#define RFL_INTERNAL_ENUMS_IS_SCOPED_ENUM_HPP_
#include <concepts>
#include <type_traits>
namespace rfl {
2024-06-08 14:10:59 -04:00
namespace internal {
namespace enums {
2024-05-31 22:59:00 -04:00
2024-06-08 14:10:59 -04:00
template <class EnumType>
concept is_scoped_enum =
std::is_enum_v<EnumType> &&
!std::is_convertible_v<EnumType, std::underlying_type_t<EnumType>>;
2024-05-31 22:59:00 -04:00
2024-06-08 14:10:59 -04:00
} // namespace enums
} // namespace internal
} // namespace rfl
2024-05-31 22:59:00 -04:00
#endif