diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 6e79f60c..fa564943 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -75,7 +75,7 @@ jobs: shell: msys2 {0} strategy: matrix: - sys: [ mingw64, mingw32, ucrt64 ] + sys: [ mingw64, ucrt64 ] steps: - uses: msys2/setup-msys2@v2 with: diff --git a/include/fmt/format.h b/include/fmt/format.h index 99b24427..7516825d 100644 --- a/include/fmt/format.h +++ b/include/fmt/format.h @@ -2053,12 +2053,12 @@ auto write_int(OutputIt out, UInt value, unsigned prefix, }); } -template ::value)> -auto make_loc_value(T value) -> basic_format_arg> { - return make_arg>(value); +template ::value)> +auto make_loc_value(T value) -> basic_format_arg { + return make_arg(value); } -template ::value)> -auto make_loc_value(T) -> basic_format_arg> { +template ::value)> +auto make_loc_value(T) -> basic_format_arg { return {}; } @@ -2067,7 +2067,7 @@ FMT_API auto write_loc(appender out, basic_format_arg value, const format_specs& specs, locale_ref loc) -> bool; template -inline auto write_loc(OutputIt, basic_format_arg>, +inline auto write_loc(OutputIt, basic_format_arg, const basic_format_specs&, locale_ref) -> bool { return false; } @@ -2190,10 +2190,8 @@ template & specs, locale_ref loc) -> OutputIt { - if (specs.localized && - write_loc(out, make_loc_value(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 & specs, locale_ref loc) -> OutputIt { - if (specs.localized && - write_loc(out, make_loc_value(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 specs, locale_ref loc = {}) -> OutputIt { if (const_check(!is_supported_floating_point(value))) return out; - if (specs.localized && - write_loc(out, make_loc_value(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 using is_exotic_char = bool_constant::value>; template -auto write_loc(OutputIt out, basic_format_arg> val, +auto write_loc(OutputIt out, basic_format_arg val, const basic_format_specs& specs, locale_ref loc) -> bool { #ifndef FMT_STATIC_THOUSANDS_SEPARATOR