diff --git a/include/boost/charconv/detail/dragonbox.hpp b/include/boost/charconv/detail/dragonbox.hpp index 05fc83c..54afb82 100644 --- a/include/boost/charconv/detail/dragonbox.hpp +++ b/include/boost/charconv/detail/dragonbox.hpp @@ -484,8 +484,12 @@ using signed_decimal_fp = decimal_fp; // Computed cache entries. //////////////////////////////////////////////////////////////////////////////////////// +#if !(defined(_MSC_VER) && _MSC_VER == 1900) template struct cache_holder_ieee754_binary32_impl +#else +struct cache_holder_ieee754_binary32 +#endif { using cache_entry_type = std::uint64_t; static constexpr int cache_bits = 64; @@ -514,7 +518,7 @@ struct cache_holder_ieee754_binary32_impl 0xb35dbf821ae4f38c, 0xe0352f62a19e306f}; }; -#if defined(BOOST_NO_CXX17_INLINE_VARIABLES) && (!defined(_MSC_VER) || _MSC_VER != 1900) +#if defined(BOOST_NO_CXX17_INLINE_VARIABLES) && !(defined(_MSC_VER) && _MSC_VER == 1900) template constexpr int cache_holder_ieee754_binary32_impl::cache_bits; template constexpr int cache_holder_ieee754_binary32_impl::min_k; @@ -523,10 +527,16 @@ template constexpr typename cache_holder_ieee754_binary32_impl::cach #endif +#if !(defined(_MSC_VER) && _MSC_VER == 1900) using cache_holder_ieee754_binary32 = cache_holder_ieee754_binary32_impl; +#endif +#if !(defined(_MSC_VER) && _MSC_VER == 1900) template struct cache_holder_ieee754_binary64_impl +#else +struct cache_holder_ieee754_binary64 +#endif { using cache_entry_type = uint128; static constexpr int cache_bits = 128; @@ -845,7 +855,7 @@ struct cache_holder_ieee754_binary64_impl {0xf70867153aa2db38, 0xb8cbee4fc66d1ea8}}; }; -#if defined(BOOST_NO_CXX17_INLINE_VARIABLES) && (!defined(_MSC_VER) || _MSC_VER != 1900) +#if defined(BOOST_NO_CXX17_INLINE_VARIABLES) && !(defined(_MSC_VER) && _MSC_VER == 1900) template constexpr int cache_holder_ieee754_binary64_impl::cache_bits; template constexpr int cache_holder_ieee754_binary64_impl::min_k; @@ -854,7 +864,9 @@ template constexpr typename cache_holder_ieee754_binary64_impl::cach #endif +#if !(defined(_MSC_VER) && _MSC_VER == 1900) using cache_holder_ieee754_binary64 = cache_holder_ieee754_binary64_impl; +#endif //////////////////////////////////////////////////////////////////////////////////////// // Policies.