From e3a2a060110dbd97c8f946d7e614bf271c3a23d5 Mon Sep 17 00:00:00 2001 From: Tony Lewis Date: Sat, 11 Apr 2020 18:30:24 +0100 Subject: [PATCH] Re-add constexpr support for newer MSVC versions --- include/boost/operators.hpp | 6 +++++- operators.htm | 16 ++++++++-------- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/include/boost/operators.hpp b/include/boost/operators.hpp index 5fc8060..6334ed9 100644 --- a/include/boost/operators.hpp +++ b/include/boost/operators.hpp @@ -109,9 +109,13 @@ # pragma warning( disable : 4284 ) // complaint about return type of #endif // operator-> not begin a UDT -// Define BOOST_OPS_CONSTEXPR to be like BOOST_CONSTEXPR but empty under MSVC +// Define BOOST_OPS_CONSTEXPR to be like BOOST_CONSTEXPR but empty under MSVC < v19.22 #ifdef BOOST_MSVC +#if BOOST_MSVC_FULL_VER >= 192200000 +#define BOOST_OPS_CONSTEXPR constexpr +#else #define BOOST_OPS_CONSTEXPR +#endif #else #define BOOST_OPS_CONSTEXPR BOOST_CONSTEXPR #endif diff --git a/operators.htm b/operators.htm index 9265b7c..bad192f 100644 --- a/operators.htm +++ b/operators.htm @@ -500,7 +500,7 @@ const point<float> pi_over_4_normalized = pi_over_4 / length(pi_over_4); "#ordering">Ordering Note. Since C++11
- (except MSVC) + (except MSVC < v19.22) @@ -520,7 +520,7 @@ const point<float> pi_over_4_normalized = pi_over_4 / length(pi_over_4); "#ordering">Ordering Note. Since C++11
- (except MSVC) + (except MSVC < v19.22) @@ -534,7 +534,7 @@ const point<float> pi_over_4_normalized = pi_over_4 / length(pi_over_4); Return convertible to bool. Since C++11
- (except MSVC) + (except MSVC < v19.22) @@ -550,7 +550,7 @@ const point<float> pi_over_4_normalized = pi_over_4 / length(pi_over_4); Return convertible to bool. Since C++11
- (except MSVC) + (except MSVC < v19.22) @@ -897,7 +897,7 @@ const point<float> pi_over_4_normalized = pi_over_4 / length(pi_over_4); "#ordering">Ordering Note. Since C++11
- (except MSVC) + (except MSVC < v19.22) @@ -911,7 +911,7 @@ const point<float> pi_over_4_normalized = pi_over_4 / length(pi_over_4); "#ordering">Ordering Note. Since C++11
- (except MSVC) + (except MSVC < v19.22) @@ -928,7 +928,7 @@ const point<float> pi_over_4_normalized = pi_over_4 / length(pi_over_4); "#ordering">Ordering Note. Since C++11
- (except MSVC) + (except MSVC < v19.22) @@ -949,7 +949,7 @@ const point<float> pi_over_4_normalized = pi_over_4 / length(pi_over_4); "#ordering">Ordering Note. Since C++11
- (except MSVC) + (except MSVC < v19.22)