mirror of
https://github.com/Neargye/magic_enum.git
synced 2026-01-10 23:44:29 +00:00
wip
This commit is contained in:
parent
e77ff3bdd6
commit
e2797c4627
1 changed files with 12 additions and 0 deletions
|
|
@ -69,4 +69,16 @@ struct std::formatter<E, std::enable_if_t<std::is_enum_v<std::decay_t<E>>, char>
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(FMT_VERSION)
|
||||||
|
|
||||||
|
template <typename E>
|
||||||
|
struct fmt::formatter<E, std::enable_if_t<std::is_enum_v<std::decay_t<E>>, char>> : fmt::formatter<std::string_view, char> {
|
||||||
|
template <class FormatContext>
|
||||||
|
auto format(E e, FormatContext& ctx) const {
|
||||||
|
return formatter<std::string_view, char>::format(format_as<E>(e), ctx);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif // NEARGYE_MAGIC_ENUM_FORMAT_HPP
|
#endif // NEARGYE_MAGIC_ENUM_FORMAT_HPP
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue