core: Fix EnumChecker::GetName()

This commit is contained in:
Eduardo Almeida
2024-01-31 23:48:42 +00:00
parent 3271f6a8b0
commit 6ec7ff4ea5

View File

@@ -292,10 +292,8 @@ EnumChecker<T>::GetName(T value) const
return v.first == value;
});
using type = typename std::
conditional_t<std::is_enum_v<T>, std::underlying_type<T>, std::type_identity<T>>::type;
NS_ASSERT_MSG(it != m_valueSet.end(),
"invalid enum value " << static_cast<type>(value)
"invalid enum value " << static_cast<int>(value)
<< "! Missed entry in MakeEnumChecker?");
return it->second;
}