diff --git a/include/fmt/ostream.h b/include/fmt/ostream.h index cff8b03e..3220bbcb 100644 --- a/include/fmt/ostream.h +++ b/include/fmt/ostream.h @@ -129,22 +129,16 @@ template struct streamed_view { const T& value; }; // Formats an object of type T that has an overloaded ostream operator<<. template -struct basic_ostream_formatter { -private: - formatter, Char> underlying_; - -public: - template - FMT_CONSTEXPR auto parse(ParseContext& ctx) -> decltype(ctx.begin()) { - return underlying_.parse(ctx); - } +struct basic_ostream_formatter : formatter, Char> { + void set_debug_format() = delete; template auto format(const T& value, basic_format_context& ctx) const -> OutputIt { auto buffer = basic_memory_buffer(); format_value(buffer, value, ctx.locale()); - return underlying_.format({buffer.data(), buffer.size()}, ctx); + return formatter, Char>::format( + {buffer.data(), buffer.size()}, ctx); } };