Closed johnilacqua closed 1 year ago
To add, this only happens with an enum class
, not if it's just an enum
.
Hi, Unfortunately, this is a problem with the Сlang compiler, perhaps an optimization bug, we don’t know how to get around it See https://github.com/Neargye/magic_enum/issues/164, https://github.com/Neargye/magic_enum/issues/65
When used on an enum defined inside a templated class,
magic_enum::enum_count<MyEnum>()
returns 0 instead of the correct value when compiled with clang.https://godbolt.org/z/vqasE9M13