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());