diff --git a/include/fmt/format.h b/include/fmt/format.h index 7dbe90c2..a862309a 100644 --- a/include/fmt/format.h +++ b/include/fmt/format.h @@ -1841,7 +1841,9 @@ OutputIt write(OutputIt out, const void* value) { return write_ptr(out, to_uintptr(value), nullptr); } -template +template >::value)> auto write(OutputIt out, const T& value) -> typename std::enable_if< mapped_type_constant>::value == type::custom_type, @@ -1850,6 +1852,17 @@ auto write(OutputIt out, const T& value) -> typename std::enable_if< return formatter().format(value, ctx); } +template >::value)> +auto write(OutputIt out, const T& value) -> typename std::enable_if< + mapped_type_constant>::value == + type::custom_type, + OutputIt>::type { + basic_format_context ctx(out, {}, {}); + return fallback_formatter().format(value, ctx); +} + // An argument visitor that formats the argument and writes it via the output // iterator. It's a class and not a generic lambda for compatibility with C++11. template struct default_arg_formatter {