mirror of
https://github.com/fmtlib/fmt.git
synced 2024-11-20 05:15:05 +00:00
Check if formatter is not defined if there is format_as
This commit is contained in:
parent
db5b8993ac
commit
e2408f37c8
@ -1440,6 +1440,7 @@ template <typename Context> struct arg_mapper {
|
||||
FMT_ENABLE_IF(std::is_enum<T>::value&& std::is_integral<U>::value)>
|
||||
FMT_CONSTEXPR FMT_INLINE auto map(const T& val)
|
||||
-> decltype(std::declval<arg_mapper>().map(U())) {
|
||||
static_assert(!has_formatter<T, Context>::value, "");
|
||||
return map(format_as(val));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user