Adds arg_formatter contructor using default locale

This avoids the need to pass a temporary (default) locale_ref.
This commit is contained in:
Kenneth Weiss 2023-01-03 12:32:51 -08:00
parent 0a52742008
commit ed37406f95

View File

@ -3583,9 +3583,12 @@ template <typename Char> struct arg_formatter {
const format_specs<Char>& specs;
locale_ref locale;
arg_formatter(buffer_appender<Char> it, const format_specs<Char>& s)
: out(it), specs(s) {}
arg_formatter(buffer_appender<Char> it, const format_specs<Char>& s,
locale_ref l)
: out{it}, specs{s}, locale{l} {}
: out(it), specs(s), locale(l) {}
template <typename T>
FMT_CONSTEXPR FMT_INLINE auto operator()(T value) -> iterator {