From 61844b6b67166690adeb297c585062aa5bebf390 Mon Sep 17 00:00:00 2001 From: Vladislav Shchapov Date: Sun, 11 Sep 2022 22:00:50 +0500 Subject: [PATCH] Fix build error on GCC-9 Signed-off-by: Vladislav Shchapov --- include/fmt/chrono.h | 4 ++-- include/fmt/xchar.h | 7 +++---- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h index b112f76e..4c702c20 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 40afbb43..1dc86324 100644 --- a/include/fmt/xchar.h +++ b/include/fmt/xchar.h @@ -22,10 +22,9 @@ namespace detail { template using is_exotic_char = bool_constant::value>; -template -auto write_loc(OutputIt out, loc_value value, - const basic_format_specs& specs, locale_ref loc) - -> bool { +inline auto write_loc(std::back_insert_iterator> out, + loc_value value, const basic_format_specs& specs, + locale_ref loc) -> bool { #ifndef FMT_STATIC_THOUSANDS_SEPARATOR auto& numpunct = std::use_facet>(loc.get());