mirror of
https://github.com/Neargye/magic_enum.git
synced 2026-01-24 01:54:22 +00:00
add is_unscoped_enum/is_scoped_enum
This commit is contained in:
parent
11a0366421
commit
d24d38ea50
3 changed files with 70 additions and 2 deletions
|
|
@ -233,3 +233,15 @@ TEST_CASE("operator<<") {
|
|||
test_ostream(number::three, "three");
|
||||
test_ostream((number)0, "");
|
||||
}
|
||||
|
||||
TEST_CASE("type_traits") {
|
||||
REQUIRE_FALSE(magic_enum::is_unscoped_enum_v<Color>);
|
||||
REQUIRE_FALSE(magic_enum::is_unscoped_enum_v<Numbers>);
|
||||
REQUIRE(magic_enum::is_unscoped_enum_v<Directions>);
|
||||
REQUIRE(magic_enum::is_unscoped_enum_v<number>);
|
||||
|
||||
REQUIRE(magic_enum::is_scoped_enum_v<Color>);
|
||||
REQUIRE(magic_enum::is_scoped_enum_v<Numbers>);
|
||||
REQUIRE_FALSE(magic_enum::is_scoped_enum_v<Directions>);
|
||||
REQUIRE_FALSE(magic_enum::is_scoped_enum_v<number>);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue