Neargye / magic_enum

Static reflection for enums (to string, from string, iteration) for modern C++, work with any enum type without any macro or boilerplate code
MIT License
4.99k stars 445 forks source link

enum_type_name includes the whole namespace #281

Closed Bernhard-L closed 1 year ago

Bernhard-L commented 1 year ago

the Version 0.9.2 breaks our code (like https://github.com/Neargye/magic_enum/issues/274) but not when using enum_name but when using enum_type_name

(tested with MSVC 19 - Windows)

runs with 0.8.2 TEST(scoped_enum_test, enum_type_name_Test) { enum class test_enum { first, second, third };

EXPECT_EQ(std::string(magic_enum::enum_type_name<test_enum>()), "test_enum");

}

breaks (at least with 0.9.2 - skipped the versions inbetween because of https://github.com/Neargye/magic_enum/issues/274)

result of test Expected equality of these values: std::string(magic_enum::enum_type_name()) Which is: "scoped_enum_test_enum_type_name_Test_Test::TestBody::test_enum" "test_enum"

Neargye commented 1 year ago

In the master, this should be fixed. I will prepare a new version soon.

I'm sorry, these problems happen because not all options were covered in the tests.

Neargye commented 1 year ago

Fix released in v0.9.3

Bernhard-L commented 1 year ago

thanks a lot - and keep on with the great work!