mirror of
https://github.com/fmtlib/fmt.git
synced 2025-08-01 19:54:46 +02:00
Disable slow windows build and simplify write_loc
This commit is contained in:
2
.github/workflows/windows.yml
vendored
2
.github/workflows/windows.yml
vendored
@@ -75,7 +75,7 @@ jobs:
|
|||||||
shell: msys2 {0}
|
shell: msys2 {0}
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
sys: [ mingw64, mingw32, ucrt64 ]
|
sys: [ mingw64, ucrt64 ]
|
||||||
steps:
|
steps:
|
||||||
- uses: msys2/setup-msys2@v2
|
- uses: msys2/setup-msys2@v2
|
||||||
with:
|
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)>
|
template <typename T, FMT_ENABLE_IF(!is_float128<T>::value)>
|
||||||
auto make_loc_value(T value) -> basic_format_arg<buffer_context<Char>> {
|
auto make_loc_value(T value) -> basic_format_arg<format_context> {
|
||||||
return make_arg<buffer_context<Char>>(value);
|
return make_arg<format_context>(value);
|
||||||
}
|
}
|
||||||
template <typename Char, typename T, FMT_ENABLE_IF(is_float128<T>::value)>
|
template <typename T, FMT_ENABLE_IF(is_float128<T>::value)>
|
||||||
auto make_loc_value(T) -> basic_format_arg<buffer_context<Char>> {
|
auto make_loc_value(T) -> basic_format_arg<format_context> {
|
||||||
return {};
|
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;
|
const format_specs& specs, locale_ref loc) -> bool;
|
||||||
|
|
||||||
template <typename OutputIt, typename Char>
|
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 {
|
const basic_format_specs<Char>&, locale_ref) -> bool {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -2190,10 +2190,8 @@ template <typename Char, typename OutputIt, typename T,
|
|||||||
FMT_CONSTEXPR FMT_INLINE auto write(OutputIt out, T value,
|
FMT_CONSTEXPR FMT_INLINE auto write(OutputIt out, T value,
|
||||||
const basic_format_specs<Char>& specs,
|
const basic_format_specs<Char>& specs,
|
||||||
locale_ref loc) -> OutputIt {
|
locale_ref loc) -> OutputIt {
|
||||||
if (specs.localized &&
|
if (specs.localized && write_loc(out, make_loc_value(value), specs, loc))
|
||||||
write_loc(out, make_loc_value<Char>(value), specs, loc)) {
|
|
||||||
return out;
|
return out;
|
||||||
}
|
|
||||||
return write_int_noinline(out, make_write_int_arg(value, specs.sign), specs,
|
return write_int_noinline(out, make_write_int_arg(value, specs.sign), specs,
|
||||||
loc);
|
loc);
|
||||||
}
|
}
|
||||||
@@ -2205,10 +2203,8 @@ template <typename Char, typename OutputIt, typename T,
|
|||||||
FMT_CONSTEXPR FMT_INLINE auto write(OutputIt out, T value,
|
FMT_CONSTEXPR FMT_INLINE auto write(OutputIt out, T value,
|
||||||
const basic_format_specs<Char>& specs,
|
const basic_format_specs<Char>& specs,
|
||||||
locale_ref loc) -> OutputIt {
|
locale_ref loc) -> OutputIt {
|
||||||
if (specs.localized &&
|
if (specs.localized && write_loc(out, make_loc_value(value), specs, loc))
|
||||||
write_loc(out, make_loc_value<Char>(value), specs, loc)) {
|
|
||||||
return out;
|
return out;
|
||||||
}
|
|
||||||
return write_int(out, make_write_int_arg(value, specs.sign), specs, loc);
|
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 = {})
|
basic_format_specs<Char> specs, locale_ref loc = {})
|
||||||
-> OutputIt {
|
-> OutputIt {
|
||||||
if (const_check(!is_supported_floating_point(value))) return out;
|
if (const_check(!is_supported_floating_point(value))) return out;
|
||||||
if (specs.localized &&
|
return specs.localized && write_loc(out, make_loc_value(value), specs, loc)
|
||||||
write_loc(out, make_loc_value<Char>(value), specs, loc)) {
|
? out
|
||||||
return out;
|
: write_float(out, value, specs, loc);
|
||||||
}
|
|
||||||
return write_float(out, value, specs, loc);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename Char, typename OutputIt, typename T,
|
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>;
|
using is_exotic_char = bool_constant<!std::is_same<T, char>::value>;
|
||||||
|
|
||||||
template <typename OutputIt>
|
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)
|
const basic_format_specs<wchar_t>& specs, locale_ref loc)
|
||||||
-> bool {
|
-> bool {
|
||||||
#ifndef FMT_STATIC_THOUSANDS_SEPARATOR
|
#ifndef FMT_STATIC_THOUSANDS_SEPARATOR
|
||||||
|
Reference in New Issue
Block a user