Fix build error on GCC-9

Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
This commit is contained in:
Vladislav Shchapov 2022-09-11 22:00:50 +05:00 committed by Victor Zverovich
parent 7a752e75ff
commit 61844b6b67
2 changed files with 5 additions and 6 deletions

View File

@ -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<Char>(out);
do_write<Char>(buf, time, loc, format, modifier);
return buf.out();
return get_iterator(buf);
}
template <typename Char, typename OutputIt,

View File

@ -22,10 +22,9 @@ namespace detail {
template <typename T>
using is_exotic_char = bool_constant<!std::is_same<T, char>::value>;
template <typename OutputIt>
auto write_loc(OutputIt out, loc_value value,
const basic_format_specs<wchar_t>& specs, locale_ref loc)
-> bool {
inline auto write_loc(std::back_insert_iterator<detail::buffer<wchar_t>> out,
loc_value value, const basic_format_specs<wchar_t>& specs,
locale_ref loc) -> bool {
#ifndef FMT_STATIC_THOUSANDS_SEPARATOR
auto& numpunct =
std::use_facet<std::numpunct<wchar_t>>(loc.get<std::locale>());