From 944a01f39e67dbc6df1915881a71d2d518628c05 Mon Sep 17 00:00:00 2001 From: John Maddock Date: Tue, 26 May 2009 08:31:23 +0000 Subject: [PATCH] GCC warning suppression fixes. Fixes #3071. [SVN r53274] --- include/boost/regex/v4/basic_regex.hpp | 4 ++++ include/boost/regex/v4/regex_traits_defaults.hpp | 15 +++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/include/boost/regex/v4/basic_regex.hpp b/include/boost/regex/v4/basic_regex.hpp index 4a396a0e..14d19218 100644 --- a/include/boost/regex/v4/basic_regex.hpp +++ b/include/boost/regex/v4/basic_regex.hpp @@ -69,6 +69,10 @@ class named_subexpressions_base { public: virtual int get_id(const charT* i, const charT* j) = 0; +#ifdef __GNUC__ + // warning supression: + virtual ~named_subexpressions_base(){} +#endif }; template diff --git a/include/boost/regex/v4/regex_traits_defaults.hpp b/include/boost/regex/v4/regex_traits_defaults.hpp index 55529c5e..5b2c6bc3 100644 --- a/include/boost/regex/v4/regex_traits_defaults.hpp +++ b/include/boost/regex/v4/regex_traits_defaults.hpp @@ -339,6 +339,21 @@ inline const charT* get_escape_R_string() #endif } +template <> +inline const char* get_escape_R_string() +{ +#ifdef BOOST_MSVC +# pragma warning(push) +# pragma warning(disable:4309) +#endif + static const char e2[] = { '(', '?', '>', '\x0D', '\x0A', '?', + '|', '[', '\x0A', '\x0B', '\x0C', '\x85', ']', ')', '\0' }; + return e2; +#ifdef BOOST_MSVC +# pragma warning(pop) +#endif +} + } // re_detail } // boost