remove Context from template parameters in detail::write
This commit is contained in:
parent
67463476b0
commit
1cca02a9f5
@ -1841,17 +1841,17 @@ OutputIt write(OutputIt out, const void* value) {
|
|||||||
return write_ptr<Char>(out, to_uintptr(value), nullptr);
|
return write_ptr<Char>(out, to_uintptr(value), nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename Char, typename OutputIt, typename T,
|
template <typename Char, typename OutputIt, typename T>
|
||||||
typename Context = basic_format_context<OutputIt, Char>>
|
auto write(OutputIt out, const T& value) -> typename std::enable_if<
|
||||||
auto write(OutputIt out, const T& value) ->
|
mapped_type_constant<T, basic_format_context<OutputIt, Char>>::value ==
|
||||||
typename std::enable_if<mapped_type_constant<T, Context>::value ==
|
type::custom_type,
|
||||||
type::custom_type,
|
OutputIt>::type {
|
||||||
OutputIt>::type {
|
using context_type = basic_format_context<OutputIt, Char>;
|
||||||
using formatter_type =
|
using formatter_type =
|
||||||
conditional_t<has_formatter<T, Context>::value,
|
conditional_t<has_formatter<T, context_type>::value,
|
||||||
typename Context::template formatter_type<T>,
|
typename context_type::template formatter_type<T>,
|
||||||
fallback_formatter<T, Char>>;
|
fallback_formatter<T, Char>>;
|
||||||
Context ctx(out, {}, {});
|
context_type ctx(out, {}, {});
|
||||||
return formatter_type().format(value, ctx);
|
return formatter_type().format(value, ctx);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user