From 4d8d35acc8259406227fe0e32702edc17c7fbf1a Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Sat, 1 Feb 2020 21:24:46 -0500 Subject: [PATCH] Fix macro guarding test traits --- include/boost/static_string/config.hpp | 3 ++- test/constexpr_tests.hpp | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/include/boost/static_string/config.hpp b/include/boost/static_string/config.hpp index 7c61947..d4e1a5a 100644 --- a/include/boost/static_string/config.hpp +++ b/include/boost/static_string/config.hpp @@ -146,7 +146,8 @@ defined(__clang__) && \ #define BOOST_STATIC_STRING_CPP14_CONSTEXPR #endif -//(defined(_MSVC_LANG) && BOOST_STATIC_STRING_STANDARD_VERSION < 201703L) +// For clang and msvc, constexpr does not work with library +// comparison function objects. #if (defined(__clang__) && (__clang_major__ < 9)) || \ (defined(_MSVC_LANG) && !defined(BOOST_STATIC_STRING_CPP20)) #define BOOST_STATIC_STRING_NO_PTR_COMP_FUNCTIONS diff --git a/test/constexpr_tests.hpp b/test/constexpr_tests.hpp index e3dd8d0..7a1a0ca 100644 --- a/test/constexpr_tests.hpp +++ b/test/constexpr_tests.hpp @@ -11,7 +11,7 @@ #include // char_traits aren't constexpr until c++17 -#if BOOST_STATIC_STRING_STANDARD_VERSION <= 201703L +#ifdef BOOST_STATIC_STRING_CPP14 struct cxper_char_traits { using char_type = char;