Skip to content

enum_type_name includes the whole namespace #281

@Bernhard-L

Description

@Bernhard-L

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"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions