diff --git a/.travis.yml b/.travis.yml index 091babd..2358ac7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -234,14 +234,14 @@ jobs: - ci/travis/coverity.sh # Standalone tests for StaticString - - { os: "linux", env: [ "COMMENT=STANDALONE", "B2_TOOLSET=gcc-7", "B2_DEFINES=define=BOOST_STATIC_STRING_STANDALONE", "B2_CXXSTD=17" ], addons: *gcc-7 } - - { os: "linux", env: [ "COMMENT=STANDALONE", "B2_TOOLSET=gcc-8", "B2_DEFINES=define=BOOST_STATIC_STRING_STANDALONE", "B2_CXXSTD=17" ], addons: *gcc-8 } - - { os: "linux", env: [ "COMMENT=STANDALONE", "B2_TOOLSET=gcc-9", "B2_DEFINES=define=BOOST_STATIC_STRING_STANDALONE", "B2_CXXSTD=17" ], addons: *gcc-9 } - - { os: "linux", env: [ "COMMENT=STANDALONE", "B2_TOOLSET=clang-6.0", "B2_DEFINES=define=BOOST_STATIC_STRING_STANDALONE", "B2_CXXSTD=17" ], addons: *clang-6 } - - { os: "linux", env: [ "COMMENT=STANDALONE", "B2_TOOLSET=clang-7", "B2_DEFINES=define=BOOST_STATIC_STRING_STANDALONE", "B2_CXXSTD=17" ], addons: *clang-7 } - - { os: "linux", env: [ "COMMENT=STANDALONE", "B2_TOOLSET=clang-8", "B2_DEFINES=define=BOOST_STATIC_STRING_STANDALONE", "B2_CXXSTD=17" ], addons: *clang-8 } - - { os: "linux", env: [ "COMMENT=STANDALONE", "B2_TOOLSET=clang-9", "B2_DEFINES=define=BOOST_STATIC_STRING_STANDALONE", "B2_CXXSTD=17" ], addons: *clang-9 } - - { os: "osx" , env: [ "COMMENT=STANDALONE", "B2_TOOLSET=clang", "B2_DEFINES=define=BOOST_STATIC_STRING_STANDALONE", "B2_CXXSTD=17" ] } + - { os: "linux", env: [ "COMMENT=STANDALONE", "B2_TOOLSET=gcc-7", "B2_DEFINES=define=BOOST_STATIC_STRING_STANDALONE", "B2_CXXSTD=17" ], addons: *gcc-7 } + - { os: "linux", env: [ "COMMENT=STANDALONE", "B2_TOOLSET=gcc-8", "B2_DEFINES=define=BOOST_STATIC_STRING_STANDALONE", "B2_CXXSTD=17" ], addons: *gcc-8 } + - { os: "linux", env: [ "COMMENT=STANDALONE", "B2_TOOLSET=gcc-9", "B2_DEFINES=define=BOOST_STATIC_STRING_STANDALONE", "B2_CXXSTD=17" ], addons: *gcc-9 } + - { os: "linux", env: [ "COMMENT=STANDALONE", "B2_TOOLSET=clang-6.0", "B2_DEFINES=define=BOOST_STATIC_STRING_STANDALONE", "B2_CXXSTD=17" ], addons: *clang-6 } + - { os: "linux", env: [ "COMMENT=STANDALONE", "B2_TOOLSET=clang-7", "B2_DEFINES=define=BOOST_STATIC_STRING_STANDALONE", "B2_CXXSTD=17" ], addons: *clang-7 } + - { os: "linux", env: [ "COMMENT=STANDALONE", "B2_TOOLSET=clang-8", "B2_DEFINES=define=BOOST_STATIC_STRING_STANDALONE", "B2_CXXSTD=17" ], addons: *clang-8 } + - { os: "linux", env: [ "COMMENT=STANDALONE", "B2_TOOLSET=clang-9", "B2_DEFINES=define=BOOST_STATIC_STRING_STANDALONE", "B2_CXXSTD=17", "B2_CXXFLAGS=-stdlib=libc++"] , addons: *clang-9 } + - { os: "osx" , env: [ "COMMENT=STANDALONE", "B2_TOOLSET=clang", "B2_DEFINES=define=BOOST_STATIC_STRING_STANDALONE", "B2_CXXSTD=17" ] } notifications: email: diff --git a/include/boost/static_string/config.hpp b/include/boost/static_string/config.hpp index 489297c..ed4cfb5 100644 --- a/include/boost/static_string/config.hpp +++ b/include/boost/static_string/config.hpp @@ -168,7 +168,7 @@ defined(__clang__) && \ // objects at all in constant expresssions. In these // cases, we use whatever will make more constexpr work. #if defined(__clang__) && defined(__GLIBCXX__) && \ -((__GLIBCXX__ >= 20180726 && __GLIBCXX__ <= 20190812)) +(__GLIBCXX__ >= 20180726 && __GLIBCXX__ <= 20190812) #define BOOST_STATIC_STRING_NO_PTR_COMP_FUNCTIONS #endif @@ -185,5 +185,4 @@ using basic_string_view = #endif } // static_string } // boost - -#endif +#endif \ No newline at end of file diff --git a/include/boost/static_string/static_string.hpp b/include/boost/static_string/static_string.hpp index c1724e3..59feb98 100644 --- a/include/boost/static_string/static_string.hpp +++ b/include/boost/static_string/static_string.hpp @@ -614,8 +614,7 @@ is_inside( // of conformance, we will settle for the best option that is available. // We don't care about this in C++11, since this function would have // no applications in constant expressions. -#ifdef BOOST_STATIC_STRING_CPP14 -#ifdef BOOST_STATIC_STRING_NO_PTR_COMP_FUNCTIONS +#if defined(BOOST_STATIC_STRING_CPP14) && defined(BOOST_STATIC_STRING_NO_PTR_COMP_FUNCTIONS) #ifdef BOOST_STATIC_STRING_IS_CONST_EVAL // Our second best option is to use is_constant_evaluated // and a loop that checks for equality, since equality for @@ -633,7 +632,6 @@ is_inside( // try builtin comparison operators instead. return ptr >= src_first && ptr < src_last; #endif -#endif #endif // Use the library comparison functions if we can't use // is_constant_evaluated or if we don't need to.