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();