From c5ecb5db9b9b2f38d9f4e58407df397a133901f4 Mon Sep 17 00:00:00 2001 From: Maya Warrier Date: Sun, 11 Jun 2023 18:15:45 -0400 Subject: [PATCH] Fix for MSVC v140 --- include/fast_float/ascii_number.h | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/include/fast_float/ascii_number.h b/include/fast_float/ascii_number.h index eea2f67..9afcdc4 100644 --- a/include/fast_float/ascii_number.h +++ b/include/fast_float/ascii_number.h @@ -111,9 +111,13 @@ FASTFLOAT_SIMD_RESTORE_WARNINGS #endif // FASTFLOAT_SSE2 -// dummy for compile -//template ())> +// MSVC SFINAE is broken pre-VS2017 +#if defined(_MSC_VER) && _MSC_VER <= 1900 template +#else +template ())> +#endif +// dummy for compile uint64_t simd_read8_to_u64(UC const*) { return 0; } @@ -215,8 +219,13 @@ FASTFLOAT_SIMD_RESTORE_WARNINGS #endif // FASTFLOAT_HAS_SIMD -// dummy for compile +// MSVC SFINAE is broken pre-VS2017 +#if defined(_MSC_VER) && _MSC_VER <= 1900 +template +#else template ())> +#endif +// dummy for compile bool simd_parse_if_eight_digits_unrolled(UC const*, uint64_t&) { return 0; }