diff --git a/.travis.yml b/.travis.yml index 9448b7c..1b6ff95 100644 --- a/.travis.yml +++ b/.travis.yml @@ -230,7 +230,16 @@ jobs: script: - cd $BOOST_ROOT/libs/$SELF - 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,2a" ], addons: *gcc-8 } + - { os: "linux", env: [ "COMMENT=STANDALONE", "B2_TOOLSET=gcc-9", "B2_DEFINES=define=BOOST_STATIC_STRING_STANDALONE", "B2_CXXSTD=17,2a" ], 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,2a" ], addons: *clang-7 } + - { os: "linux", env: [ "COMMENT=STANDALONE", "B2_TOOLSET=clang-8", "B2_DEFINES=define=BOOST_STATIC_STRING_STANDALONE", "B2_CXXSTD=17,2a" ], addons: *clang-8 } + - { os: "osx" , env: [ "COMMENT=STANDALONE", "B2_TOOLSET=clang", "B2_DEFINES=define=BOOST_STATIC_STRING_STANDALONE", "B2_CXXSTD=17" ] } + notifications: email: false diff --git a/include/boost/static_string/config.hpp b/include/boost/static_string/config.hpp index fbec78a..50312a1 100644 --- a/include/boost/static_string/config.hpp +++ b/include/boost/static_string/config.hpp @@ -12,7 +12,7 @@ #define BOOST_STATIC_STRING_CONFIG_HPP // Are we dependent on Boost? -// #define BOOST_STATIC_STRING_STANDALONE +#define BOOST_STATIC_STRING_STANDALONE // Disable exceptions and their associated checks // #define BOOST_STATIC_STRING_NO_EXCEPTIONS diff --git a/include/boost/static_string/detail/static_string.hpp b/include/boost/static_string/detail/static_string.hpp index 5032c40..ec46d6d 100644 --- a/include/boost/static_string/detail/static_string.hpp +++ b/include/boost/static_string/detail/static_string.hpp @@ -76,14 +76,14 @@ public: CharT* data_impl() noexcept { - return data_; + return +data_; } BOOST_STATIC_STRING_CPP14_CONSTEXPR CharT const* data_impl() const noexcept { - return data_; + return +data_; } BOOST_STATIC_STRING_CPP11_CONSTEXPR @@ -171,14 +171,14 @@ public: CharT* data_impl() noexcept { - return data_; + return +data_; } BOOST_STATIC_STRING_CPP14_CONSTEXPR CharT const* data_impl() const noexcept { - return data_; + return +data_; } BOOST_STATIC_STRING_CPP11_CONSTEXPR