From 1cca02a9f519227126df01f650c082aaf32d45cb Mon Sep 17 00:00:00 2001 From: Alexey Ochapov Date: Thu, 20 Aug 2020 03:34:48 +0300 Subject: [PATCH] remove Context from template parameters in detail::write --- include/fmt/format.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) 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); }