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