From ce10bcd6c1081999fb2aa061a2f54a9670751665 Mon Sep 17 00:00:00 2001 From: Vladislav Shchapov Date: Sun, 11 Sep 2022 02:43:12 +0500 Subject: [PATCH] Fix build error on GCC-9 Signed-off-by: Vladislav Shchapov --- include/fmt/chrono.h | 4 ++-- include/fmt/xchar.h | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h index b112f76e991c3..4c702c20e7280 100644 --- a/include/fmt/chrono.h +++ b/include/fmt/chrono.h @@ -427,7 +427,7 @@ auto write(OutputIt out, const std::tm& time, const std::locale& loc, char format, char modifier = 0) -> OutputIt { auto&& buf = get_buffer(out); do_write(buf, time, loc, format, modifier); - return buf.out(); + return get_iterator(buf); } template ::value)> inline Int to_nonnegative_int(T value, Int upper) { FMT_ASSERT(std::is_unsigned::value || - (value >= 0 && to_unsigned(value) <= to_unsigned(upper)), + (value >= 0 && to_unsigned(value) <= to_unsigned(upper)), "invalid value"); (void)upper; return static_cast(value); diff --git a/include/fmt/xchar.h b/include/fmt/xchar.h index 5fb5c8154fd66..5db7dacd64b9e 100644 --- a/include/fmt/xchar.h +++ b/include/fmt/xchar.h @@ -22,9 +22,9 @@ namespace detail { template using is_exotic_char = bool_constant::value>; -template -auto write_loc(OutputIt out, basic_format_arg> val, - const basic_format_specs& specs, locale_ref loc) +inline auto write_loc(std::back_insert_iterator> out, + basic_format_arg> val, + const basic_format_specs& specs, locale_ref loc) -> bool { #ifndef FMT_STATIC_THOUSANDS_SEPARATOR auto& numpunct =