1
0
Fork 0
mirror of https://github.com/Neargye/magic_enum.git synced 2026-01-09 23:34:23 +00:00

add missing magic_enum namespace (#223)

This commit is contained in:
ilobilo 2022-11-22 13:37:06 +04:00 committed by GitHub
parent aa1f2869f4
commit 20cac97b53
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -59,7 +59,7 @@ struct std::formatter<E, std::enable_if_t<std::is_enum_v<E> && magic_enum::custo
static_assert(std::is_same_v<char, string_view::value_type>, "formatter requires string_view::value_type type same as char.");
using D = std::decay_t<E>;
if constexpr (detail::supported<D>::value) {
if constexpr (magic_enum::detail::supported<D>::value) {
if (const auto name = magic_enum::enum_name<D, magic_enum::as_flags<magic_enum::detail::is_flags_v<D>>>(e); !name.empty()) {
return std::formatter<std::string_view, char>::format(std::string_view{name.data(), name.size()}, ctx);
}