diff --git a/include/fmt/format.h b/include/fmt/format.h index 36fed37b..9cee1528 100644 --- a/include/fmt/format.h +++ b/include/fmt/format.h @@ -1841,17 +1841,17 @@ OutputIt write(OutputIt out, const void* value) { return write_ptr(out, to_uintptr(value), nullptr); } -template > -auto write(OutputIt out, const T& value) -> - typename std::enable_if::value == - type::custom_type, - OutputIt>::type { +template +auto write(OutputIt out, const T& value) -> typename std::enable_if< + mapped_type_constant>::value == + type::custom_type, + OutputIt>::type { + using context_type = basic_format_context; using formatter_type = - conditional_t::value, - typename Context::template formatter_type, + conditional_t::value, + typename context_type::template formatter_type, fallback_formatter>; - Context ctx(out, {}, {}); + context_type ctx(out, {}, {}); return formatter_type().format(value, ctx); }