increase MSVC version restriction
This commit is contained in:
parent
55600c96e9
commit
35b94fa9b3
@ -770,7 +770,8 @@ template <typename Char, typename Rep, typename OutputIt,
|
|||||||
OutputIt format_duration_value(OutputIt out, Rep val, int) {
|
OutputIt format_duration_value(OutputIt out, Rep val, int) {
|
||||||
static FMT_CONSTEXPR_DECL const Char format[] = {'{', '}', 0};
|
static FMT_CONSTEXPR_DECL const Char format[] = {'{', '}', 0};
|
||||||
|
|
||||||
#if defined(FMT_MSC_VER) && FMT_MSC_VER < 1928
|
// Workaround a compiler error in MSVC < 16.8.2
|
||||||
|
#if defined(FMT_MSC_VER) && FMT_MSC_VER <= 1928
|
||||||
return vformat_to(out, to_string_view(format),
|
return vformat_to(out, to_string_view(format),
|
||||||
make_format_args<buffer_context<Char>>(val));
|
make_format_args<buffer_context<Char>>(val));
|
||||||
#else
|
#else
|
||||||
@ -784,7 +785,7 @@ OutputIt format_duration_value(OutputIt out, Rep val, int precision) {
|
|||||||
static FMT_CONSTEXPR_DECL const Char pr_f[] = {'{', ':', '.', '{',
|
static FMT_CONSTEXPR_DECL const Char pr_f[] = {'{', ':', '.', '{',
|
||||||
'}', 'f', '}', 0};
|
'}', 'f', '}', 0};
|
||||||
if (precision >= 0) {
|
if (precision >= 0) {
|
||||||
#if defined(FMT_MSC_VER) && FMT_MSC_VER < 1928
|
#if defined(FMT_MSC_VER) && FMT_MSC_VER <= 1928
|
||||||
return vformat_to(out, to_string_view(pr_f),
|
return vformat_to(out, to_string_view(pr_f),
|
||||||
make_format_args<buffer_context<Char>>(val, precision));
|
make_format_args<buffer_context<Char>>(val, precision));
|
||||||
#else
|
#else
|
||||||
@ -793,7 +794,7 @@ OutputIt format_duration_value(OutputIt out, Rep val, int precision) {
|
|||||||
}
|
}
|
||||||
static FMT_CONSTEXPR_DECL const Char fp_f[] = {'{', ':', 'g', '}', 0};
|
static FMT_CONSTEXPR_DECL const Char fp_f[] = {'{', ':', 'g', '}', 0};
|
||||||
|
|
||||||
#if defined(FMT_MSC_VER) && FMT_MSC_VER < 1928
|
#if defined(FMT_MSC_VER) && FMT_MSC_VER <= 1928
|
||||||
return vformat_to(out, to_string_view(fp_f),
|
return vformat_to(out, to_string_view(fp_f),
|
||||||
make_format_args<buffer_context<Char>>(val));
|
make_format_args<buffer_context<Char>>(val));
|
||||||
#else
|
#else
|
||||||
@ -820,7 +821,7 @@ OutputIt format_duration_unit(OutputIt out) {
|
|||||||
return copy_unit(string_view(unit), out, Char());
|
return copy_unit(string_view(unit), out, Char());
|
||||||
static FMT_CONSTEXPR_DECL const Char num_f[] = {'[', '{', '}', ']', 's', 0};
|
static FMT_CONSTEXPR_DECL const Char num_f[] = {'[', '{', '}', ']', 's', 0};
|
||||||
if (const_check(Period::den == 1)) {
|
if (const_check(Period::den == 1)) {
|
||||||
#if defined(FMT_MSC_VER) && FMT_MSC_VER < 1928
|
#if defined(FMT_MSC_VER) && FMT_MSC_VER <= 1928
|
||||||
return vformat_to(out, to_string_view(num_f),
|
return vformat_to(out, to_string_view(num_f),
|
||||||
make_format_args<buffer_context<Char>>(Period::num));
|
make_format_args<buffer_context<Char>>(Period::num));
|
||||||
#else
|
#else
|
||||||
@ -829,7 +830,7 @@ OutputIt format_duration_unit(OutputIt out) {
|
|||||||
}
|
}
|
||||||
static FMT_CONSTEXPR_DECL const Char num_def_f[] = {'[', '{', '}', '/', '{',
|
static FMT_CONSTEXPR_DECL const Char num_def_f[] = {'[', '{', '}', '/', '{',
|
||||||
'}', ']', 's', 0};
|
'}', ']', 's', 0};
|
||||||
#if defined(FMT_MSC_VER) && FMT_MSC_VER < 1928
|
#if defined(FMT_MSC_VER) && FMT_MSC_VER <= 1928
|
||||||
return vformat_to(
|
return vformat_to(
|
||||||
out, to_string_view(num_def_f),
|
out, to_string_view(num_def_f),
|
||||||
make_format_args<buffer_context<Char>>(Period::num, Period::den));
|
make_format_args<buffer_context<Char>>(Period::num, Period::den));
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user