Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enum_type_name includes the whole namespace #281

Closed
Bernhard-L opened this issue Jun 20, 2023 · 3 comments
Closed

enum_type_name includes the whole namespace #281

Bernhard-L opened this issue Jun 20, 2023 · 3 comments

Comments

@Bernhard-L
Copy link

the Version 0.9.2 breaks our code (like #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 #274)

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

@Neargye
Copy link
Owner

Neargye commented Jun 21, 2023

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 Neargye closed this as completed Jun 21, 2023
@Neargye Neargye added this to the v0.9.3 milestone Jun 21, 2023
@Neargye
Copy link
Owner

Neargye commented Jun 22, 2023

Fix released in v0.9.3

@Bernhard-L
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants