diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 70085f5c6778..961c934ffaac 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -28,6 +28,11 @@ jobs: std: 17 install: sudo apt install g++-8 os: ubuntu-18.04 + - cxx: g++-9 + build_type: Debug + std: 17 + install: sudo apt install g++-9 + os: ubuntu-18.04 - cxx: g++-10 build_type: Debug std: 17 diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h index b112f76e991c..4c702c20e728 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 40afbb43d8c6..1dc863243f53 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());