diff --git a/include/fmt/base.h b/include/fmt/base.h index 16dc37ad..0456e334 100644 --- a/include/fmt/base.h +++ b/include/fmt/base.h @@ -1107,11 +1107,9 @@ struct use_formatter !has_to_string_view::value && !is_named_arg::value && !use_format_as::value> {}; -template -auto has_formatter_impl(T* p) - -> decltype(formatter, Char>().format( - *p, std::declval&>()), - std::true_type()); +template > +auto has_formatter_impl(T* p, buffered_context* ctx = nullptr) + -> decltype(formatter().format(*p, *ctx), std::true_type()); template auto has_formatter_impl(...) -> std::false_type; // T can be const-qualified to check if it is const-formattable. template constexpr auto has_formatter() -> bool {