mirror of
https://github.com/fmtlib/fmt.git
synced 2024-12-25 15:21:54 +00:00
Fix build error on GCC-9
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
This commit is contained in:
parent
7a752e75ff
commit
61844b6b67
@ -427,7 +427,7 @@ auto write(OutputIt out, const std::tm& time, const std::locale& loc,
|
|||||||
char format, char modifier = 0) -> OutputIt {
|
char format, char modifier = 0) -> OutputIt {
|
||||||
auto&& buf = get_buffer<Char>(out);
|
auto&& buf = get_buffer<Char>(out);
|
||||||
do_write<Char>(buf, time, loc, format, modifier);
|
do_write<Char>(buf, time, loc, format, modifier);
|
||||||
return buf.out();
|
return get_iterator(buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename Char, typename OutputIt,
|
template <typename Char, typename OutputIt,
|
||||||
@ -1397,7 +1397,7 @@ inline bool isfinite(T) {
|
|||||||
template <typename T, typename Int, FMT_ENABLE_IF(std::is_integral<T>::value)>
|
template <typename T, typename Int, FMT_ENABLE_IF(std::is_integral<T>::value)>
|
||||||
inline Int to_nonnegative_int(T value, Int upper) {
|
inline Int to_nonnegative_int(T value, Int upper) {
|
||||||
FMT_ASSERT(std::is_unsigned<Int>::value ||
|
FMT_ASSERT(std::is_unsigned<Int>::value ||
|
||||||
(value >= 0 && to_unsigned(value) <= to_unsigned(upper)),
|
(value >= 0 && to_unsigned(value) <= to_unsigned(upper)),
|
||||||
"invalid value");
|
"invalid value");
|
||||||
(void)upper;
|
(void)upper;
|
||||||
return static_cast<Int>(value);
|
return static_cast<Int>(value);
|
||||||
|
@ -22,10 +22,9 @@ namespace detail {
|
|||||||
template <typename T>
|
template <typename T>
|
||||||
using is_exotic_char = bool_constant<!std::is_same<T, char>::value>;
|
using is_exotic_char = bool_constant<!std::is_same<T, char>::value>;
|
||||||
|
|
||||||
template <typename OutputIt>
|
inline auto write_loc(std::back_insert_iterator<detail::buffer<wchar_t>> out,
|
||||||
auto write_loc(OutputIt out, loc_value value,
|
loc_value value, const basic_format_specs<wchar_t>& specs,
|
||||||
const basic_format_specs<wchar_t>& specs, locale_ref loc)
|
locale_ref loc) -> bool {
|
||||||
-> bool {
|
|
||||||
#ifndef FMT_STATIC_THOUSANDS_SEPARATOR
|
#ifndef FMT_STATIC_THOUSANDS_SEPARATOR
|
||||||
auto& numpunct =
|
auto& numpunct =
|
||||||
std::use_facet<std::numpunct<wchar_t>>(loc.get<std::locale>());
|
std::use_facet<std::numpunct<wchar_t>>(loc.get<std::locale>());
|
||||||
|
Loading…
Reference in New Issue
Block a user