From 95950392f8fcbb312e7374c28c691c100ff9edac Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Wed, 16 Dec 2020 14:50:15 +0000 Subject: [PATCH] Warning suppression. --- include/boost/regex/config.hpp | 22 ++++++++++++++----- .../boost/regex/v4/regex_token_iterator.hpp | 2 ++ .../boost/regex/v5/regex_token_iterator.hpp | 1 + 3 files changed, 19 insertions(+), 6 deletions(-) diff --git a/include/boost/regex/config.hpp b/include/boost/regex/config.hpp index 24c13b25..a221b155 100644 --- a/include/boost/regex/config.hpp +++ b/include/boost/regex/config.hpp @@ -126,8 +126,23 @@ #ifdef BOOST_FALLTHROUGH # define BOOST_REGEX_FALLTHROUGH BOOST_FALLTHROUGH #else + +#if defined(__clang__) && (__cplusplus >= 201103L) && defined(__has_warning) +# if __has_feature(cxx_attributes) && __has_warning("-Wimplicit-fallthrough") +# define BOOST_REGEX_FALLTHROUGH [[clang::fallthrough]] +# endif +#endif +#if !defined(BOOST_REGEX_FALLTHROUGH) && defined(__INTEL_COMPILER) && (__INTEL_COMPILER >= 1800) && (__cplusplus >= 201703) +# define BOOST_REGEX_FALLTHROUGH [[fallthrough]] +#endif +#if !defined(BOOST_REGEX_FALLTHROUGH) && defined(__GNUC__) && (__GNUC__ >= 7) +# define BOOST_REGEX_FALLTHROUGH __attribute__((fallthrough)) +#endif + +#if !defined(BOOST_REGEX_FALLTHROUGH) # define BOOST_REGEX_FALLTHROUGH #endif +#endif /* @@ -219,12 +234,7 @@ * ****************************************************************************/ -#if !defined(BOOST_SYMBOL_EXPORT) -# define BOOST_SYMBOL_EXPORT -# define BOOST_SYMBOL_IMPORT -#endif - -#if (defined(BOOST_REGEX_DYN_LINK) || defined(BOOST_ALL_DYN_LINK)) && !defined(BOOST_REGEX_STATIC_LINK) +#if (defined(BOOST_REGEX_DYN_LINK) || defined(BOOST_ALL_DYN_LINK)) && !defined(BOOST_REGEX_STATIC_LINK) && defined(BOOST_SYMBOL_IMPORT) # if defined(BOOST_REGEX_SOURCE) # define BOOST_REGEX_BUILD_DLL # define BOOST_REGEX_DECL BOOST_SYMBOL_EXPORT diff --git a/include/boost/regex/v4/regex_token_iterator.hpp b/include/boost/regex/v4/regex_token_iterator.hpp index ab15a257..fc54b3c9 100644 --- a/include/boost/regex/v4/regex_token_iterator.hpp +++ b/include/boost/regex/v4/regex_token_iterator.hpp @@ -66,6 +66,8 @@ class regex_token_iterator_implementation std::vector subs; // the sub-expressions to enumerate public: + regex_token_iterator_implementation(const regex_token_iterator_implementation& other) + : what(other.what), base(other.base), end(other.end), re(other.re), flags(other.flags), result(other.result), N(other.N), subs(other.subs) {} regex_token_iterator_implementation(const regex_type* p, BidirectionalIterator last, int sub, match_flag_type f) : end(last), re(*p), flags(f), N(0){ subs.push_back(sub); } regex_token_iterator_implementation(const regex_type* p, BidirectionalIterator last, const std::vector& v, match_flag_type f) diff --git a/include/boost/regex/v5/regex_token_iterator.hpp b/include/boost/regex/v5/regex_token_iterator.hpp index a21de34d..40ebc5e7 100644 --- a/include/boost/regex/v5/regex_token_iterator.hpp +++ b/include/boost/regex/v5/regex_token_iterator.hpp @@ -67,6 +67,7 @@ public: subs.push_back(submatches[i]); } } + regex_token_iterator_implementation(const regex_token_iterator_implementation& other) = default; bool init(BidirectionalIterator first) { N = 0;