mirror of
https://github.com/fmtlib/fmt.git
synced 2025-01-06 04:50:05 +00:00
Disable slow windows build and simplify write_loc
This commit is contained in:
parent
c3494ae364
commit
58c4c012fa
2
.github/workflows/windows.yml
vendored
2
.github/workflows/windows.yml
vendored
@ -75,7 +75,7 @@ jobs:
|
||||
shell: msys2 {0}
|
||||
strategy:
|
||||
matrix:
|
||||
sys: [ mingw64, mingw32, ucrt64 ]
|
||||
sys: [ mingw64, ucrt64 ]
|
||||
steps:
|
||||
- uses: msys2/setup-msys2@v2
|
||||
with:
|
||||
|
@ -2053,12 +2053,12 @@ auto write_int(OutputIt out, UInt value, unsigned prefix,
|
||||
});
|
||||
}
|
||||
|
||||
template <typename Char, typename T, FMT_ENABLE_IF(!is_float128<T>::value)>
|
||||
auto make_loc_value(T value) -> basic_format_arg<buffer_context<Char>> {
|
||||
return make_arg<buffer_context<Char>>(value);
|
||||
template <typename T, FMT_ENABLE_IF(!is_float128<T>::value)>
|
||||
auto make_loc_value(T value) -> basic_format_arg<format_context> {
|
||||
return make_arg<format_context>(value);
|
||||
}
|
||||
template <typename Char, typename T, FMT_ENABLE_IF(is_float128<T>::value)>
|
||||
auto make_loc_value(T) -> basic_format_arg<buffer_context<Char>> {
|
||||
template <typename T, FMT_ENABLE_IF(is_float128<T>::value)>
|
||||
auto make_loc_value(T) -> basic_format_arg<format_context> {
|
||||
return {};
|
||||
}
|
||||
|
||||
@ -2067,7 +2067,7 @@ FMT_API auto write_loc(appender out, basic_format_arg<format_context> value,
|
||||
const format_specs& specs, locale_ref loc) -> bool;
|
||||
|
||||
template <typename OutputIt, typename Char>
|
||||
inline auto write_loc(OutputIt, basic_format_arg<buffer_context<Char>>,
|
||||
inline auto write_loc(OutputIt, basic_format_arg<format_context>,
|
||||
const basic_format_specs<Char>&, locale_ref) -> bool {
|
||||
return false;
|
||||
}
|
||||
@ -2190,10 +2190,8 @@ template <typename Char, typename OutputIt, typename T,
|
||||
FMT_CONSTEXPR FMT_INLINE auto write(OutputIt out, T value,
|
||||
const basic_format_specs<Char>& specs,
|
||||
locale_ref loc) -> OutputIt {
|
||||
if (specs.localized &&
|
||||
write_loc(out, make_loc_value<Char>(value), specs, loc)) {
|
||||
if (specs.localized && write_loc(out, make_loc_value(value), specs, loc))
|
||||
return out;
|
||||
}
|
||||
return write_int_noinline(out, make_write_int_arg(value, specs.sign), specs,
|
||||
loc);
|
||||
}
|
||||
@ -2205,10 +2203,8 @@ template <typename Char, typename OutputIt, typename T,
|
||||
FMT_CONSTEXPR FMT_INLINE auto write(OutputIt out, T value,
|
||||
const basic_format_specs<Char>& specs,
|
||||
locale_ref loc) -> OutputIt {
|
||||
if (specs.localized &&
|
||||
write_loc(out, make_loc_value<Char>(value), specs, loc)) {
|
||||
if (specs.localized && write_loc(out, make_loc_value(value), specs, loc))
|
||||
return out;
|
||||
}
|
||||
return write_int(out, make_write_int_arg(value, specs.sign), specs, loc);
|
||||
}
|
||||
|
||||
@ -3315,11 +3311,9 @@ FMT_CONSTEXPR20 auto write(OutputIt out, T value,
|
||||
basic_format_specs<Char> specs, locale_ref loc = {})
|
||||
-> OutputIt {
|
||||
if (const_check(!is_supported_floating_point(value))) return out;
|
||||
if (specs.localized &&
|
||||
write_loc(out, make_loc_value<Char>(value), specs, loc)) {
|
||||
return out;
|
||||
}
|
||||
return write_float(out, value, specs, loc);
|
||||
return specs.localized && write_loc(out, make_loc_value(value), specs, loc)
|
||||
? out
|
||||
: write_float(out, value, specs, loc);
|
||||
}
|
||||
|
||||
template <typename Char, typename OutputIt, typename T,
|
||||
|
@ -23,7 +23,7 @@ template <typename T>
|
||||
using is_exotic_char = bool_constant<!std::is_same<T, char>::value>;
|
||||
|
||||
template <typename OutputIt>
|
||||
auto write_loc(OutputIt out, basic_format_arg<buffer_context<wchar_t>> val,
|
||||
auto write_loc(OutputIt out, basic_format_arg<format_context> val,
|
||||
const basic_format_specs<wchar_t>& specs, locale_ref loc)
|
||||
-> bool {
|
||||
#ifndef FMT_STATIC_THOUSANDS_SEPARATOR
|
||||
|
Loading…
Reference in New Issue
Block a user