From c83e21e8f2ac9dd1aa3aae2fd64116c965f74514 Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Tue, 17 Dec 2019 00:30:59 -0500 Subject: [PATCH] Remove trailing tokens after macro --- include/boost/static_string/config.hpp | 7 ++++++- test/static_string.cpp | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/include/boost/static_string/config.hpp b/include/boost/static_string/config.hpp index 1a1a49b..2a7af47 100644 --- a/include/boost/static_string/config.hpp +++ b/include/boost/static_string/config.hpp @@ -114,8 +114,13 @@ #endif #endif -#if (__cplusplus >= 201402L) && (__cplusplus < 201703L) && defined(BOOST_STATIC_STRING_NULL_OPTIMIZATION) && defined(__clang__) && ((__clang_major__ == 4) || (__clang_major__ == 5)) +#if (__cplusplus >= 201402L) && \ +(__cplusplus < 201703L) && \ +defined(BOOST_STATIC_STRING_NULL_OPTIMIZATION) && \ +defined(__clang__) && \ +((__clang_major__ == 4) || (__clang_major__ == 5)) #error The null terminator optimization is not supported for clang 4.x and clang 5.x +#undef BOOST_STATIC_STRING_NULL_OPTIMIZATION #endif namespace boost { diff --git a/test/static_string.cpp b/test/static_string.cpp index f8d7c4b..9c3f8c3 100644 --- a/test/static_string.cpp +++ b/test/static_string.cpp @@ -6974,7 +6974,7 @@ constexpr bool testConstexpr() //constexpr auto h = s1.assign({'1'}); //constexpr auto i = s1.assign("", 1); -#else __cplusplus >= 201103L +#elif __cplusplus >= 201103L // c++11 constexpr tests /*basic_static_string<4, char, cxper_char_traits> a; auto b = a.size();