From 406accd17e0d0b9c87008eff0467b6a0b3d376da Mon Sep 17 00:00:00 2001 From: rbrugo Date: Mon, 7 Mar 2022 16:49:59 +0100 Subject: [PATCH] Move styled_arg definition into the previous detail block --- include/fmt/color.h | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/include/fmt/color.h b/include/fmt/color.h index c9c5a93c..7fa83007 100644 --- a/include/fmt/color.h +++ b/include/fmt/color.h @@ -492,6 +492,14 @@ template inline void reset_color(buffer& buffer) { buffer.append(reset_color.begin(), reset_color.end()); } +template struct styled_arg { + FMT_CONSTEXPR styled_arg(Arg const& argument, text_style style) + : argument(argument), style(style) {} + + const Arg& argument; + text_style style; +}; + template void vformat_to(buffer& buf, const text_style& ts, basic_string_view format_str, @@ -630,18 +638,6 @@ inline auto format_to(OutputIt out, const text_style& ts, const S& format_str, fmt::make_format_args>>(args...)); } -FMT_BEGIN_DETAIL_NAMESPACE - -template struct styled_arg { - FMT_CONSTEXPR styled_arg(Arg const& argument, text_style style) - : argument(argument), style(style) {} - - const Arg& argument; - text_style style; -}; - -FMT_END_DETAIL_NAMESPACE - template struct formatter, Char> : formatter { template