diff options
Diffstat (limited to 'boost/regex/v4')
-rw-r--r-- | boost/regex/v4/basic_regex.hpp | 8 | ||||
-rw-r--r-- | boost/regex/v4/basic_regex_creator.hpp | 4 | ||||
-rw-r--r-- | boost/regex/v4/basic_regex_parser.hpp | 7 | ||||
-rw-r--r-- | boost/regex/v4/fileiter.hpp | 3 | ||||
-rw-r--r-- | boost/regex/v4/instances.hpp | 19 | ||||
-rw-r--r-- | boost/regex/v4/match_flags.hpp | 3 | ||||
-rw-r--r-- | boost/regex/v4/match_results.hpp | 15 | ||||
-rw-r--r-- | boost/regex/v4/perl_matcher.hpp | 9 | ||||
-rw-r--r-- | boost/regex/v4/perl_matcher_common.hpp | 10 | ||||
-rw-r--r-- | boost/regex/v4/perl_matcher_non_recursive.hpp | 8 | ||||
-rw-r--r-- | boost/regex/v4/regex_format.hpp | 5 | ||||
-rw-r--r-- | boost/regex/v4/regex_iterator.hpp | 8 | ||||
-rw-r--r-- | boost/regex/v4/regex_raw_buffer.hpp | 6 | ||||
-rw-r--r-- | boost/regex/v4/regex_split.hpp | 4 | ||||
-rw-r--r-- | boost/regex/v4/regex_token_iterator.hpp | 8 | ||||
-rw-r--r-- | boost/regex/v4/regex_traits_defaults.hpp | 23 | ||||
-rw-r--r-- | boost/regex/v4/regex_workaround.hpp | 11 | ||||
-rw-r--r-- | boost/regex/v4/u32regex_iterator.hpp | 10 | ||||
-rw-r--r-- | boost/regex/v4/u32regex_token_iterator.hpp | 12 | ||||
-rw-r--r-- | boost/regex/v4/w32_regex_traits.hpp | 2 |
20 files changed, 93 insertions, 82 deletions
diff --git a/boost/regex/v4/basic_regex.hpp b/boost/regex/v4/basic_regex.hpp index ac91af2914..1962372018 100644 --- a/boost/regex/v4/basic_regex.hpp +++ b/boost/regex/v4/basic_regex.hpp @@ -36,10 +36,16 @@ namespace boost{ #ifdef BOOST_MSVC #pragma warning(push) -#pragma warning(disable : 4251 4231 4800) +#pragma warning(disable : 4251) +#if BOOST_MSVC < 1700 +# pragma warning(disable : 4231) +#endif #if BOOST_MSVC < 1600 #pragma warning(disable : 4660) #endif +#if BOOST_MSVC < 1910 +#pragma warning(disable:4800) +#endif #endif namespace BOOST_REGEX_DETAIL_NS{ diff --git a/boost/regex/v4/basic_regex_creator.hpp b/boost/regex/v4/basic_regex_creator.hpp index 623e06f162..7c00652739 100644 --- a/boost/regex/v4/basic_regex_creator.hpp +++ b/boost/regex/v4/basic_regex_creator.hpp @@ -33,7 +33,9 @@ #ifdef BOOST_MSVC # pragma warning(push) -# pragma warning(disable: 4800) +#if BOOST_MSVC < 1910 +#pragma warning(disable:4800) +#endif #endif namespace boost{ diff --git a/boost/regex/v4/basic_regex_parser.hpp b/boost/regex/v4/basic_regex_parser.hpp index 7c2852fa51..6c7065f057 100644 --- a/boost/regex/v4/basic_regex_parser.hpp +++ b/boost/regex/v4/basic_regex_parser.hpp @@ -35,7 +35,10 @@ namespace BOOST_REGEX_DETAIL_NS{ #ifdef BOOST_MSVC #pragma warning(push) -#pragma warning(disable:4244 4800) +#pragma warning(disable:4244) +#if BOOST_MSVC < 1910 +#pragma warning(disable:4800) +#endif #endif inline boost::intmax_t umax(mpl::false_ const&) @@ -183,7 +186,7 @@ void basic_regex_parser<charT, traits>::parse(const charT* p1, const charT* p2, // have had an unexpected ')' : if(!result) { - fail(regex_constants::error_paren, ::boost::BOOST_REGEX_DETAIL_NS::distance(m_base, m_position), "Found a closing ) with no corresponding openening parenthesis."); + fail(regex_constants::error_paren, ::boost::BOOST_REGEX_DETAIL_NS::distance(m_base, m_position), "Found a closing ) with no corresponding opening parenthesis."); return; } // if an error has been set then give up now: diff --git a/boost/regex/v4/fileiter.hpp b/boost/regex/v4/fileiter.hpp index 256a7e4606..7c865c6309 100644 --- a/boost/regex/v4/fileiter.hpp +++ b/boost/regex/v4/fileiter.hpp @@ -195,9 +195,6 @@ public: }; class BOOST_REGEX_DECL mapfile_iterator -#if !defined(BOOST_NO_STD_ITERATOR) || defined(BOOST_MSVC_STD_ITERATOR) -: public std::iterator<std::random_access_iterator_tag, char> -#endif { typedef mapfile::pointer internal_pointer; internal_pointer* node; diff --git a/boost/regex/v4/instances.hpp b/boost/regex/v4/instances.hpp index 05ac71a686..0e423437c7 100644 --- a/boost/regex/v4/instances.hpp +++ b/boost/regex/v4/instances.hpp @@ -84,7 +84,10 @@ template class BOOST_REGEX_DECL ::boost::BOOST_REGEX_DETAIL_NS::perl_matcher<BOO # ifdef BOOST_MSVC # pragma warning(push) -# pragma warning(disable : 4251 4231) +# pragma warning(disable : 4251) +#if BOOST_MSVC < 1700 +# pragma warning(disable : 4231) +#endif # if BOOST_MSVC < 1600 # pragma warning(disable : 4660) # endif @@ -119,9 +122,17 @@ template class BOOST_REGEX_TEMPLATE_DECL ::boost::BOOST_REGEX_DETAIL_NS::perl_ma #elif (defined(__GNUC__) && (__GNUC__ >= 3)) || !defined(BOOST_NO_CXX11_EXTERN_TEMPLATE) -#ifdef __clang__ -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wkeyword-macro" +#if defined(__clang__) +# pragma clang diagnostic push +# if defined(__APPLE_CC__) +# if (__clang_major__ > 6) +# pragma clang diagnostic ignored "-Wkeyword-macro" +# endif +# else +# if (__clang_major__ > 3) || ((__clang_major__ == 3) && (__clang_minor__ > 5)) +# pragma clang diagnostic ignored "-Wkeyword-macro" +# endif +# endif #endif # ifndef BOOST_REGEX_INSTANTIATE diff --git a/boost/regex/v4/match_flags.hpp b/boost/regex/v4/match_flags.hpp index 1938b27a44..aa8fd53263 100644 --- a/boost/regex/v4/match_flags.hpp +++ b/boost/regex/v4/match_flags.hpp @@ -22,7 +22,6 @@ #ifdef __cplusplus # include <boost/cstdint.hpp> #endif -#include <boost/detail/workaround.hpp> #ifdef __cplusplus namespace boost{ @@ -83,7 +82,7 @@ typedef enum _match_flags } match_flags; -#if defined(__BORLANDC__) || BOOST_WORKAROUND(BOOST_MSVC, <= 1310) +#if defined(__BORLANDC__) || (defined(_MSC_VER) && (_MSC_VER <= 1310)) typedef unsigned long match_flag_type; #else typedef match_flags match_flag_type; diff --git a/boost/regex/v4/match_results.hpp b/boost/regex/v4/match_results.hpp index c8233bdd87..d88a7b16bd 100644 --- a/boost/regex/v4/match_results.hpp +++ b/boost/regex/v4/match_results.hpp @@ -33,7 +33,10 @@ namespace boost{ #ifdef BOOST_MSVC #pragma warning(push) -#pragma warning(disable : 4251 4231) +#pragma warning(disable : 4251) +#if BOOST_MSVC < 1700 +# pragma warning(disable : 4231) +#endif # if BOOST_MSVC < 1600 # pragma warning(disable : 4660) # endif @@ -56,7 +59,9 @@ private: #endif public: typedef sub_match<BidiIterator> value_type; -#if !defined(BOOST_NO_STD_ALLOCATOR) && !(defined(BOOST_MSVC) && defined(_STLPORT_VERSION)) +#ifndef BOOST_NO_CXX11_ALLOCATOR + typedef typename std::allocator_traits<Allocator>::value_type const & const_reference; +#elif !defined(BOOST_NO_STD_ALLOCATOR) && !(defined(BOOST_MSVC) && defined(_STLPORT_VERSION)) typedef typename Allocator::const_reference const_reference; #else typedef const value_type& const_reference; @@ -66,7 +71,11 @@ public: typedef const_iterator iterator; typedef typename BOOST_REGEX_DETAIL_NS::regex_iterator_traits< BidiIterator>::difference_type difference_type; +#ifdef BOOST_NO_CXX11_ALLOCATOR typedef typename Allocator::size_type size_type; +#else + typedef typename std::allocator_traits<Allocator>::size_type size_type; +#endif typedef Allocator allocator_type; typedef typename BOOST_REGEX_DETAIL_NS::regex_iterator_traits< BidiIterator>::value_type char_type; @@ -563,7 +572,7 @@ private: // static void raise_logic_error() { - std::logic_error e("Attempt to access an uninitialzed boost::match_results<> class."); + std::logic_error e("Attempt to access an uninitialized boost::match_results<> class."); boost::throw_exception(e); } diff --git a/boost/regex/v4/perl_matcher.hpp b/boost/regex/v4/perl_matcher.hpp index a696e5d99b..663e6188e2 100644 --- a/boost/regex/v4/perl_matcher.hpp +++ b/boost/regex/v4/perl_matcher.hpp @@ -27,7 +27,9 @@ #ifdef BOOST_MSVC # pragma warning(push) -# pragma warning(disable: 4800) +#if BOOST_MSVC < 1910 +#pragma warning(disable:4800) +#endif #endif namespace boost{ @@ -353,7 +355,10 @@ struct recursion_info #ifdef BOOST_MSVC #pragma warning(push) -#pragma warning(disable : 4251 4231) +#pragma warning(disable : 4251) +#if BOOST_MSVC < 1700 +# pragma warning(disable : 4231) +#endif # if BOOST_MSVC < 1600 # pragma warning(disable : 4660) # endif diff --git a/boost/regex/v4/perl_matcher_common.hpp b/boost/regex/v4/perl_matcher_common.hpp index a0973da92a..3c654e588e 100644 --- a/boost/regex/v4/perl_matcher_common.hpp +++ b/boost/regex/v4/perl_matcher_common.hpp @@ -36,7 +36,9 @@ #endif #ifdef BOOST_MSVC # pragma warning(push) -# pragma warning(disable: 4800) +#if BOOST_MSVC < 1910 +#pragma warning(disable:4800) +#endif #endif namespace boost{ @@ -476,12 +478,14 @@ bool perl_matcher<BidiIterator, Allocator, traits>::match_word_boundary() } else { - b = (m_match_flags & match_not_eow) ? true : false; + if (m_match_flags & match_not_eow) + return false; + b = false; } if((position == backstop) && ((m_match_flags & match_prev_avail) == 0)) { if(m_match_flags & match_not_bow) - b ^= true; + return false; else b ^= false; } diff --git a/boost/regex/v4/perl_matcher_non_recursive.hpp b/boost/regex/v4/perl_matcher_non_recursive.hpp index 3d89749d02..db883f1e20 100644 --- a/boost/regex/v4/perl_matcher_non_recursive.hpp +++ b/boost/regex/v4/perl_matcher_non_recursive.hpp @@ -34,7 +34,10 @@ #endif #ifdef BOOST_MSVC # pragma warning(push) -# pragma warning(disable: 4800 4706) +# pragma warning(disable: 4706) +#if BOOST_MSVC < 1910 +#pragma warning(disable:4800) +#endif #endif namespace boost{ @@ -1797,7 +1800,7 @@ bool perl_matcher<BidiIterator, Allocator, traits>::unwind_recursion_pop(bool r) // Backtracking out of a recursion, we must pop state off the recursion // stack unconditionally to ensure matched pushes and pops: saved_state* pmp = static_cast<saved_state*>(m_backup_state); - if (!r) + if (!r && !recursion_stack.empty()) { *m_presult = recursion_stack.back().results; position = recursion_stack.back().location_of_start; @@ -1834,6 +1837,7 @@ bool perl_matcher<BidiIterator, Allocator, traits>::unwind_commit(bool b) // If we stop because we just unwound an assertion, put the // commit state back on the stack again: // + m_unwound_lookahead = false; saved_state* pmp = m_backup_state; --pmp; if(pmp < m_stack_base) diff --git a/boost/regex/v4/regex_format.hpp b/boost/regex/v4/regex_format.hpp index f0a0a11e40..b65ffcc9cc 100644 --- a/boost/regex/v4/regex_format.hpp +++ b/boost/regex/v4/regex_format.hpp @@ -800,9 +800,6 @@ void basic_regex_formatter<OutputIterator, Results, traits, ForwardIter>::put(co template <class S> class string_out_iterator -#ifndef BOOST_NO_STD_ITERATOR - : public std::iterator<std::output_iterator_tag, typename S::value_type> -#endif { S* out; public: @@ -816,13 +813,11 @@ public: return *this; } -#ifdef BOOST_NO_STD_ITERATOR typedef std::ptrdiff_t difference_type; typedef typename S::value_type value_type; typedef value_type* pointer; typedef value_type& reference; typedef std::output_iterator_tag iterator_category; -#endif }; template <class OutputIterator, class Iterator, class Alloc, class ForwardIter, class traits> diff --git a/boost/regex/v4/regex_iterator.hpp b/boost/regex/v4/regex_iterator.hpp index 0d10a1b98f..380a9a71a4 100644 --- a/boost/regex/v4/regex_iterator.hpp +++ b/boost/regex/v4/regex_iterator.hpp @@ -85,14 +85,6 @@ template <class BidirectionalIterator, class charT = BOOST_DEDUCED_TYPENAME BOOST_REGEX_DETAIL_NS::regex_iterator_traits<BidirectionalIterator>::value_type, class traits = regex_traits<charT> > class regex_iterator -#ifndef BOOST_NO_STD_ITERATOR - : public std::iterator< - std::forward_iterator_tag, - match_results<BidirectionalIterator>, - typename BOOST_REGEX_DETAIL_NS::regex_iterator_traits<BidirectionalIterator>::difference_type, - const match_results<BidirectionalIterator>*, - const match_results<BidirectionalIterator>& > -#endif { private: typedef regex_iterator_implementation<BidirectionalIterator, charT, traits> impl; diff --git a/boost/regex/v4/regex_raw_buffer.hpp b/boost/regex/v4/regex_raw_buffer.hpp index fcdb856a55..f1f4f50ae5 100644 --- a/boost/regex/v4/regex_raw_buffer.hpp +++ b/boost/regex/v4/regex_raw_buffer.hpp @@ -138,12 +138,12 @@ public: size_type BOOST_REGEX_CALL size() { - return end - start; + return size_type(end - start); } size_type BOOST_REGEX_CALL capacity() { - return last - start; + return size_type(last - start); } void* BOOST_REGEX_CALL data()const @@ -153,7 +153,7 @@ public: size_type BOOST_REGEX_CALL index(void* ptr) { - return static_cast<pointer>(ptr) - static_cast<pointer>(data()); + return size_type(static_cast<pointer>(ptr) - static_cast<pointer>(data())); } void BOOST_REGEX_CALL clear() diff --git a/boost/regex/v4/regex_split.hpp b/boost/regex/v4/regex_split.hpp index 65b2c64abf..afa5659831 100644 --- a/boost/regex/v4/regex_split.hpp +++ b/boost/regex/v4/regex_split.hpp @@ -36,7 +36,9 @@ namespace boost{ #ifdef BOOST_MSVC # pragma warning(push) -# pragma warning(disable: 4800) +#if BOOST_MSVC < 1910 +#pragma warning(disable:4800) +#endif #endif namespace BOOST_REGEX_DETAIL_NS{ diff --git a/boost/regex/v4/regex_token_iterator.hpp b/boost/regex/v4/regex_token_iterator.hpp index 1d75604bf1..fde51d74eb 100644 --- a/boost/regex/v4/regex_token_iterator.hpp +++ b/boost/regex/v4/regex_token_iterator.hpp @@ -167,14 +167,6 @@ template <class BidirectionalIterator, class charT = BOOST_DEDUCED_TYPENAME BOOST_REGEX_DETAIL_NS::regex_iterator_traits<BidirectionalIterator>::value_type, class traits = regex_traits<charT> > class regex_token_iterator -#ifndef BOOST_NO_STD_ITERATOR - : public std::iterator< - std::forward_iterator_tag, - sub_match<BidirectionalIterator>, - typename BOOST_REGEX_DETAIL_NS::regex_iterator_traits<BidirectionalIterator>::difference_type, - const sub_match<BidirectionalIterator>*, - const sub_match<BidirectionalIterator>& > -#endif { private: typedef regex_token_iterator_implementation<BidirectionalIterator, charT, traits> impl; diff --git a/boost/regex/v4/regex_traits_defaults.hpp b/boost/regex/v4/regex_traits_defaults.hpp index df9922dfd4..e58d6bae23 100644 --- a/boost/regex/v4/regex_traits_defaults.hpp +++ b/boost/regex/v4/regex_traits_defaults.hpp @@ -39,6 +39,7 @@ #include <boost/regex/v4/error_type.hpp> #endif #include <boost/type_traits/make_unsigned.hpp> +#include <boost/utility/enable_if.hpp> #ifdef BOOST_NO_STDC_NAMESPACE namespace std{ @@ -240,7 +241,7 @@ inline std::ptrdiff_t global_length<char>(const char* p) template<> inline std::ptrdiff_t global_length<wchar_t>(const wchar_t* p) { - return (std::wcslen)(p); + return (std::ptrdiff_t)(std::wcslen)(p); } #endif template <class charT> @@ -327,17 +328,17 @@ boost::intmax_t global_toi(const charT*& p1, const charT* p2, int radix, const t } template <class charT> -inline const charT* get_escape_R_string() +inline typename boost::enable_if_c<(sizeof(charT) > 1), const charT*>::type get_escape_R_string() { #ifdef BOOST_MSVC # pragma warning(push) # pragma warning(disable:4309 4245) #endif - static const charT e1[] = { '(', '?', '>', '\\', 'x', '0', 'D', '\\', 'x', '0', 'A', '?', - '|', '[', '\\', 'x', '0', 'A', '\\', 'x', '0', 'B', '\\', 'x', '0', 'C', static_cast<unsigned char>('\x85'), '\\', 'x', '{', '2', '0', '2', '8', '}', - '\\', 'x', '{', '2', '0', '2', '9', '}', ']', ')', '\0' }; - static const charT e2[] = { '(', '?', '>', '\\', 'x', '0', 'D', '\\', 'x', '0', 'A', '?', - '|', '[', '\\', 'x', '0', 'A', '\\', 'x', '0', 'B', '\\', 'x', '0', 'C', static_cast<unsigned char>('\x85'), ']', ')', '\0' }; + static const charT e1[] = { '(', '?', '-', 'x', ':', '(', '?', '>', '\x0D', '\x0A', '?', + '|', '[', '\x0A', '\x0B', '\x0C', static_cast<charT>(0x85), static_cast<charT>(0x2028), + static_cast<charT>(0x2029), ']', ')', ')', '\0' }; + static const charT e2[] = { '(', '?', '-', 'x', ':', '(', '?', '>', '\x0D', '\x0A', '?', + '|', '[', '\x0A', '\x0B', '\x0C', static_cast<charT>(0x85), ']', ')', ')', '\0' }; charT c = static_cast<charT>(0x2029u); bool b = (static_cast<unsigned>(c) == 0x2029u); @@ -348,15 +349,15 @@ inline const charT* get_escape_R_string() #endif } -template <> -inline const char* get_escape_R_string<char>() +template <class charT> +inline typename boost::disable_if_c<(sizeof(charT) > 1), const charT*>::type get_escape_R_string() { #ifdef BOOST_MSVC # pragma warning(push) # pragma warning(disable:4309) #endif - static const char e2[] = { '(', '?', '>', '\\', 'x', '0', 'D', '\\', 'x', '0', 'A', '?', - '|', '[', '\\', 'x', '0', 'A', '\\', 'x', '0', 'B', '\\', 'x', '0', 'C', '\\', 'x', '8', '5', ']', ')', '\0' }; + static const charT e2[] = { '(', '?', '-', 'x', ':', '(', '?', '>', '\x0D', '\x0A', '?', + '|', '[', '\x0A', '\x0B', '\x0C', '\x85', ']', ')', ')', '\0' }; return e2; #ifdef BOOST_MSVC # pragma warning(pop) diff --git a/boost/regex/v4/regex_workaround.hpp b/boost/regex/v4/regex_workaround.hpp index f245f90d4e..35eafc253a 100644 --- a/boost/regex/v4/regex_workaround.hpp +++ b/boost/regex/v4/regex_workaround.hpp @@ -198,9 +198,10 @@ namespace boost{ namespace BOOST_REGEX_DETAIL_NS{ const char *strSource ) { - if(std::strlen(strSource)+1 > sizeInBytes) + std::size_t lenSourceWithNull = std::strlen(strSource) + 1; + if (lenSourceWithNull > sizeInBytes) return 1; - std::strcpy(strDestination, strSource); + std::memcpy(strDestination, strSource, lenSourceWithNull); return 0; } inline std::size_t strcat_s( @@ -209,9 +210,11 @@ namespace boost{ namespace BOOST_REGEX_DETAIL_NS{ const char *strSource ) { - if(std::strlen(strSource) + std::strlen(strDestination) + 1 > sizeInBytes) + std::size_t lenSourceWithNull = std::strlen(strSource) + 1; + std::size_t lenDestination = std::strlen(strDestination); + if (lenSourceWithNull + lenDestination > sizeInBytes) return 1; - std::strcat(strDestination, strSource); + std::memcpy(strDestination + lenDestination, strSource, lenSourceWithNull); return 0; } diff --git a/boost/regex/v4/u32regex_iterator.hpp b/boost/regex/v4/u32regex_iterator.hpp index 701ef3d80e..f8763a8d6a 100644 --- a/boost/regex/v4/u32regex_iterator.hpp +++ b/boost/regex/v4/u32regex_iterator.hpp @@ -72,14 +72,6 @@ private: template <class BidirectionalIterator> class u32regex_iterator -#ifndef BOOST_NO_STD_ITERATOR - : public std::iterator< - std::forward_iterator_tag, - match_results<BidirectionalIterator>, - typename BOOST_REGEX_DETAIL_NS::regex_iterator_traits<BidirectionalIterator>::difference_type, - const match_results<BidirectionalIterator>*, - const match_results<BidirectionalIterator>& > -#endif { private: typedef u32regex_iterator_implementation<BidirectionalIterator> impl; @@ -166,7 +158,7 @@ inline u32regex_iterator<const wchar_t*> make_u32regex_iterator(const wchar_t* p return u32regex_iterator<const wchar_t*>(p, p+std::wcslen(p), e, m); } #endif -#if !defined(U_WCHAR_IS_UTF16) && (U_SIZEOF_WCHAR_T != 2) +#if !defined(BOOST_REGEX_UCHAR_IS_WCHAR_T) inline u32regex_iterator<const UChar*> make_u32regex_iterator(const UChar* p, const u32regex& e, regex_constants::match_flag_type m = regex_constants::match_default) { return u32regex_iterator<const UChar*>(p, p+u_strlen(p), e, m); diff --git a/boost/regex/v4/u32regex_token_iterator.hpp b/boost/regex/v4/u32regex_token_iterator.hpp index 9eabbe48a1..952f7c4135 100644 --- a/boost/regex/v4/u32regex_token_iterator.hpp +++ b/boost/regex/v4/u32regex_token_iterator.hpp @@ -155,14 +155,6 @@ private: template <class BidirectionalIterator> class u32regex_token_iterator -#ifndef BOOST_NO_STD_ITERATOR - : public std::iterator< - std::forward_iterator_tag, - sub_match<BidirectionalIterator>, - typename BOOST_REGEX_DETAIL_NS::regex_iterator_traits<BidirectionalIterator>::difference_type, - const sub_match<BidirectionalIterator>*, - const sub_match<BidirectionalIterator>& > -#endif { private: typedef u32regex_token_iterator_implementation<BidirectionalIterator> impl; @@ -275,7 +267,7 @@ inline u32regex_token_iterator<const wchar_t*> make_u32regex_token_iterator(cons return u32regex_token_iterator<const wchar_t*>(p, p+std::wcslen(p), e, submatch, m); } #endif -#if !defined(U_WCHAR_IS_UTF16) && (U_SIZEOF_WCHAR_T != 2) +#if !defined(BOOST_REGEX_UCHAR_IS_WCHAR_T) inline u32regex_token_iterator<const UChar*> make_u32regex_token_iterator(const UChar* p, const u32regex& e, int submatch = 0, regex_constants::match_flag_type m = regex_constants::match_default) { return u32regex_token_iterator<const UChar*>(p, p+u_strlen(p), e, submatch, m); @@ -305,7 +297,7 @@ inline u32regex_token_iterator<const wchar_t*> make_u32regex_token_iterator(cons return u32regex_token_iterator<const wchar_t*>(p, p+std::wcslen(p), e, submatch, m); } #endif -#if !defined(U_WCHAR_IS_UTF16) && (U_SIZEOF_WCHAR_T != 2) +#if !defined(BOOST_REGEX_UCHAR_IS_WCHAR_T) template <std::size_t N> inline u32regex_token_iterator<const UChar*> make_u32regex_token_iterator(const UChar* p, const u32regex& e, const int (&submatch)[N], regex_constants::match_flag_type m = regex_constants::match_default) { diff --git a/boost/regex/v4/w32_regex_traits.hpp b/boost/regex/v4/w32_regex_traits.hpp index bf996d6119..378ee8565e 100644 --- a/boost/regex/v4/w32_regex_traits.hpp +++ b/boost/regex/v4/w32_regex_traits.hpp @@ -51,8 +51,10 @@ #ifdef BOOST_MSVC #pragma warning(push) #pragma warning(disable:4786) +#if BOOST_MSVC < 1910 #pragma warning(disable:4800) #endif +#endif namespace boost{ |