diff --git a/include/boost/regex/config.hpp b/include/boost/regex/config.hpp index e8cec5b7..7e6cc519 100644 --- a/include/boost/regex/config.hpp +++ b/include/boost/regex/config.hpp @@ -224,7 +224,7 @@ * ****************************************************************************/ -#if defined(BOOST_MSVC) && (BOOST_MSVC >= 1200) && defined(_MSC_EXTENSIONS) +#if defined(BOOST_MSVC) && defined(_MSC_EXTENSIONS) #if defined(_DEBUG) || defined(__MSVC_RUNTIME_CHECKS) || defined(_MANAGED) || defined(BOOST_REGEX_NO_FASTCALL) # define BOOST_REGEX_CALL __cdecl #else diff --git a/include/boost/regex/icu.hpp b/include/boost/regex/icu.hpp index a8c52814..37fec2ac 100644 --- a/include/boost/regex/icu.hpp +++ b/include/boost/regex/icu.hpp @@ -887,9 +887,6 @@ inline OutputIterator u32regex_replace(OutputIterator out, match_flag_type flags = match_default) { return re_detail::extract_output_base -#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) - -#endif ( re_detail::do_regex_replace( re_detail::make_utf32_out(out, static_cast const*>(0)), @@ -909,9 +906,6 @@ inline OutputIterator u32regex_replace(OutputIterator out, match_flag_type flags = match_default) { return re_detail::extract_output_base -#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) - -#endif ( re_detail::do_regex_replace( re_detail::make_utf32_out(out, static_cast const*>(0)), @@ -931,9 +925,6 @@ inline OutputIterator u32regex_replace(OutputIterator out, match_flag_type flags = match_default) { return re_detail::extract_output_base -#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) - -#endif ( re_detail::do_regex_replace( re_detail::make_utf32_out(out, static_cast const*>(0)), diff --git a/include/boost/regex/mfc.hpp b/include/boost/regex/mfc.hpp index 02502f95..8ecaf1f5 100644 --- a/include/boost/regex/mfc.hpp +++ b/include/boost/regex/mfc.hpp @@ -31,20 +31,16 @@ typedef match_results tmatch; typedef regex_iterator tregex_iterator; typedef regex_token_iterator tregex_token_iterator; -#if _MSC_VER >= 1310 +// Obsolete. Remove #define SIMPLE_STRING_PARAM class B, bool b #define SIMPLE_STRING_ARG_LIST B, b -#else -#define SIMPLE_STRING_PARAM class B -#define SIMPLE_STRING_ARG_LIST B -#endif // // define regex creation functions: // -template +template inline basic_regex -make_regex(const ATL::CSimpleStringT& s, ::boost::regex_constants::syntax_option_type f = boost::regex_constants::normal) +make_regex(const ATL::CSimpleStringT& s, ::boost::regex_constants::syntax_option_type f = boost::regex_constants::normal) { basic_regex result(s.GetString(), s.GetString() + s.GetLength(), f); return result; @@ -52,8 +48,8 @@ make_regex(const ATL::CSimpleStringT& s, ::boost::regex_ // // regex_match overloads: // -template -inline bool regex_match(const ATL::CSimpleStringT& s, +template +inline bool regex_match(const ATL::CSimpleStringT& s, match_results& what, const basic_regex& e, boost::regex_constants::match_flag_type f = boost::regex_constants::match_default) @@ -65,8 +61,8 @@ inline bool regex_match(const ATL::CSimpleStringT& s, f); } -template -inline bool regex_match(const ATL::CSimpleStringT& s, +template +inline bool regex_match(const ATL::CSimpleStringT& s, const basic_regex& e, boost::regex_constants::match_flag_type f = boost::regex_constants::match_default) { @@ -78,8 +74,8 @@ inline bool regex_match(const ATL::CSimpleStringT& s, // // regex_search overloads: // -template -inline bool regex_search(const ATL::CSimpleStringT& s, +template +inline bool regex_search(const ATL::CSimpleStringT& s, match_results& what, const basic_regex& e, boost::regex_constants::match_flag_type f = boost::regex_constants::match_default) @@ -91,8 +87,8 @@ inline bool regex_search(const ATL::CSimpleStringT& s, f); } -template -inline bool regex_search(const ATL::CSimpleStringT& s, +template +inline bool regex_search(const ATL::CSimpleStringT& s, const basic_regex& e, boost::regex_constants::match_flag_type f = boost::regex_constants::match_default) { @@ -104,45 +100,45 @@ inline bool regex_search(const ATL::CSimpleStringT& s, // // regex_iterator creation: // -template +template inline regex_iterator -make_regex_iterator(const ATL::CSimpleStringT& s, const basic_regex& e, ::boost::regex_constants::match_flag_type f = boost::regex_constants::match_default) +make_regex_iterator(const ATL::CSimpleStringT& s, const basic_regex& e, ::boost::regex_constants::match_flag_type f = boost::regex_constants::match_default) { regex_iterator result(s.GetString(), s.GetString() + s.GetLength(), e, f); return result; } -template +template inline regex_token_iterator - make_regex_token_iterator(const ATL::CSimpleStringT& s, const basic_regex& e, int sub = 0, ::boost::regex_constants::match_flag_type f = boost::regex_constants::match_default) + make_regex_token_iterator(const ATL::CSimpleStringT& s, const basic_regex& e, int sub = 0, ::boost::regex_constants::match_flag_type f = boost::regex_constants::match_default) { regex_token_iterator result(s.GetString(), s.GetString() + s.GetLength(), e, sub, f); return result; } -template +template inline regex_token_iterator -make_regex_token_iterator(const ATL::CSimpleStringT& s, const basic_regex& e, const std::vector& subs, ::boost::regex_constants::match_flag_type f = boost::regex_constants::match_default) +make_regex_token_iterator(const ATL::CSimpleStringT& s, const basic_regex& e, const std::vector& subs, ::boost::regex_constants::match_flag_type f = boost::regex_constants::match_default) { regex_token_iterator result(s.GetString(), s.GetString() + s.GetLength(), e, subs, f); return result; } -template +template inline regex_token_iterator -make_regex_token_iterator(const ATL::CSimpleStringT& s, const basic_regex& e, const int (& subs)[N], ::boost::regex_constants::match_flag_type f = boost::regex_constants::match_default) +make_regex_token_iterator(const ATL::CSimpleStringT& s, const basic_regex& e, const int (& subs)[N], ::boost::regex_constants::match_flag_type f = boost::regex_constants::match_default) { regex_token_iterator result(s.GetString(), s.GetString() + s.GetLength(), e, subs, f); return result; } template + class B, bool b> OutputIterator regex_replace(OutputIterator out, BidirectionalIterator first, BidirectionalIterator last, const basic_regex& e, - const ATL::CSimpleStringT& fmt, + const ATL::CSimpleStringT& fmt, match_flag_type flags = match_default) { return ::boost::regex_replace(out, first, last, e, fmt.GetString(), flags); @@ -150,12 +146,12 @@ OutputIterator regex_replace(OutputIterator out, namespace re_detail{ -template +template class mfc_string_out_iterator { - ATL::CSimpleStringT* out; + ATL::CSimpleStringT* out; public: - mfc_string_out_iterator(ATL::CSimpleStringT& s) : out(&s) {} + mfc_string_out_iterator(ATL::CSimpleStringT& s) : out(&s) {} mfc_string_out_iterator& operator++() { return *this; } mfc_string_out_iterator& operator++(int) { return *this; } mfc_string_out_iterator& operator*() { return *this; } @@ -173,14 +169,14 @@ public: } -template -ATL::CSimpleStringT regex_replace(const ATL::CSimpleStringT& s, +template +ATL::CSimpleStringT regex_replace(const ATL::CSimpleStringT& s, const basic_regex& e, - const ATL::CSimpleStringT& fmt, + const ATL::CSimpleStringT& fmt, match_flag_type flags = match_default) { - ATL::CSimpleStringT result(s.GetManager()); - re_detail::mfc_string_out_iterator i(result); + ATL::CSimpleStringT result(s.GetManager()); + re_detail::mfc_string_out_iterator i(result); regex_replace(i, s.GetString(), s.GetString() + s.GetLength(), e, fmt.GetString(), flags); return result; } diff --git a/include/boost/regex/pending/unicode_iterator.hpp b/include/boost/regex/pending/unicode_iterator.hpp index 3a7b68fb..89afdd9d 100644 --- a/include/boost/regex/pending/unicode_iterator.hpp +++ b/include/boost/regex/pending/unicode_iterator.hpp @@ -141,7 +141,7 @@ class u32_to_u16_iterator { typedef boost::iterator_facade, U16Type, std::bidirectional_iterator_tag, const U16Type> base_type; -#if !defined(BOOST_NO_STD_ITERATOR_TRAITS) && !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) +#if !defined(BOOST_NO_STD_ITERATOR_TRAITS) typedef typename std::iterator_traits::value_type base_value_type; BOOST_STATIC_ASSERT(sizeof(base_value_type)*CHAR_BIT == 32); @@ -256,7 +256,7 @@ class u16_to_u32_iterator // special values for pending iterator reads: BOOST_STATIC_CONSTANT(U32Type, pending_read = 0xffffffffu); -#if !defined(BOOST_NO_STD_ITERATOR_TRAITS) && !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) +#if !defined(BOOST_NO_STD_ITERATOR_TRAITS) typedef typename std::iterator_traits::value_type base_value_type; BOOST_STATIC_ASSERT(sizeof(base_value_type)*CHAR_BIT == 16); @@ -371,7 +371,7 @@ class u32_to_u8_iterator { typedef boost::iterator_facade, U8Type, std::bidirectional_iterator_tag, const U8Type> base_type; -#if !defined(BOOST_NO_STD_ITERATOR_TRAITS) && !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) +#if !defined(BOOST_NO_STD_ITERATOR_TRAITS) typedef typename std::iterator_traits::value_type base_value_type; BOOST_STATIC_ASSERT(sizeof(base_value_type)*CHAR_BIT == 32); @@ -499,7 +499,7 @@ class u8_to_u32_iterator // special values for pending iterator reads: BOOST_STATIC_CONSTANT(U32Type, pending_read = 0xffffffffu); -#if !defined(BOOST_NO_STD_ITERATOR_TRAITS) && !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) +#if !defined(BOOST_NO_STD_ITERATOR_TRAITS) typedef typename std::iterator_traits::value_type base_value_type; BOOST_STATIC_ASSERT(sizeof(base_value_type)*CHAR_BIT == 8); diff --git a/include/boost/regex/v4/basic_regex_creator.hpp b/include/boost/regex/v4/basic_regex_creator.hpp index c99d320d..1c2c5d90 100644 --- a/include/boost/regex/v4/basic_regex_creator.hpp +++ b/include/boost/regex/v4/basic_regex_creator.hpp @@ -47,9 +47,7 @@ struct digraph : public std::pair digraph(charT c1) : std::pair(c1, 0){} digraph(charT c1, charT c2) : std::pair(c1, c2) {} -#if !BOOST_WORKAROUND(BOOST_MSVC, < 1300) digraph(const digraph& d) : std::pair(d.first, d.second){} -#endif template digraph(const Seq& s) : std::pair() { @@ -433,20 +431,10 @@ re_syntax_base* basic_regex_creator::append_set( if(flags() & regex_constants::collate) { // we need to transform our range into sort keys: -#if BOOST_WORKAROUND(__GNUC__, < 3) - string_type in(3, charT(0)); - in[0] = c1.first; - in[1] = c1.second; - s1 = this->m_traits.transform(in.c_str(), (in[1] ? in.c_str()+2 : in.c_str()+1)); - in[0] = c2.first; - in[1] = c2.second; - s2 = this->m_traits.transform(in.c_str(), (in[1] ? in.c_str()+2 : in.c_str()+1)); -#else charT a1[3] = { c1.first, c1.second, charT(0), }; charT a2[3] = { c2.first, c2.second, charT(0), }; s1 = this->m_traits.transform(a1, (a1[1] ? a1+2 : a1+1)); s2 = this->m_traits.transform(a2, (a2[1] ? a2+2 : a2+1)); -#endif if(s1.size() == 0) s1 = string_type(1, charT(0)); if(s2.size() == 0) @@ -491,15 +479,8 @@ re_syntax_base* basic_regex_creator::append_set( string_type s; if(first->second) { -#if BOOST_WORKAROUND(__GNUC__, < 3) - string_type in(3, charT(0)); - in[0] = first->first; - in[1] = first->second; - s = m_traits.transform_primary(in.c_str(), in.c_str()+2); -#else charT cs[3] = { first->first, first->second, charT(0), }; s = m_traits.transform_primary(cs, cs+2); -#endif } else s = m_traits.transform_primary(&first->first, &first->first+1); diff --git a/include/boost/regex/v4/cpp_regex_traits.hpp b/include/boost/regex/v4/cpp_regex_traits.hpp index d60942f0..53f56da8 100644 --- a/include/boost/regex/v4/cpp_regex_traits.hpp +++ b/include/boost/regex/v4/cpp_regex_traits.hpp @@ -624,7 +624,6 @@ typename cpp_regex_traits_implementation::string_type return pos->second; } #if !defined(BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS)\ - && !BOOST_WORKAROUND(BOOST_MSVC, < 1300)\ && !BOOST_WORKAROUND(__BORLANDC__, <= 0x0551) std::string name(p1, p2); #else @@ -635,7 +634,6 @@ typename cpp_regex_traits_implementation::string_type #endif name = lookup_default_collate_name(name); #if !defined(BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS)\ - && !BOOST_WORKAROUND(BOOST_MSVC, < 1300)\ && !BOOST_WORKAROUND(__BORLANDC__, <= 0x0551) if(name.size()) return string_type(name.begin(), name.end()); @@ -857,7 +855,7 @@ bool cpp_regex_traits_implementation::isctype(const charT c, char_class_t template -inline boost::shared_ptr > create_cpp_regex_traits(const std::locale& l BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE(charT)) +inline boost::shared_ptr > create_cpp_regex_traits(const std::locale& l) { cpp_regex_traits_base key(l); return ::boost::object_cache, cpp_regex_traits_implementation >::get(key, 5); diff --git a/include/boost/regex/v4/instances.hpp b/include/boost/regex/v4/instances.hpp index 6807b2f0..6fa811d2 100644 --- a/include/boost/regex/v4/instances.hpp +++ b/include/boost/regex/v4/instances.hpp @@ -92,9 +92,7 @@ template class BOOST_REGEX_DECL ::boost::re_detail::perl_matcher; -#if !BOOST_WORKAROUND(BOOST_MSVC, < 1300) template class BOOST_REGEX_TEMPLATE_DECL match_results< const BOOST_REGEX_CHAR_T* >; -#endif #ifndef BOOST_NO_STD_ALLOCATOR template class BOOST_REGEX_TEMPLATE_DECL ::boost::re_detail::perl_matcher::allocator_type BOOST_REGEX_TRAITS_T >; #endif @@ -102,9 +100,7 @@ template class BOOST_REGEX_TEMPLATE_DECL ::boost::re_detail::perl_matcher::const_iterator >; -#endif #ifndef BOOST_NO_STD_ALLOCATOR template class BOOST_REGEX_TEMPLATE_DECL ::boost::re_detail::perl_matcher< std::basic_string::const_iterator, match_results< std::basic_string::const_iterator >::allocator_type, boost::regex_traits >; #endif diff --git a/include/boost/regex/v4/iterator_traits.hpp b/include/boost/regex/v4/iterator_traits.hpp index f7afacb1..53e13760 100644 --- a/include/boost/regex/v4/iterator_traits.hpp +++ b/include/boost/regex/v4/iterator_traits.hpp @@ -33,7 +33,7 @@ namespace boost{ namespace re_detail{ -#if defined(BOOST_NO_STD_ITERATOR_TRAITS) || defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) +#if defined(BOOST_NO_STD_ITERATOR_TRAITS) template struct regex_iterator_traits diff --git a/include/boost/regex/v4/match_flags.hpp b/include/boost/regex/v4/match_flags.hpp index 26bde9a5..e21de6cf 100644 --- a/include/boost/regex/v4/match_flags.hpp +++ b/include/boost/regex/v4/match_flags.hpp @@ -71,7 +71,7 @@ typedef enum _match_flags } match_flags; -#if (defined(_MSC_VER) && (_MSC_VER < 1300)) || defined(__BORLANDC__) +#if defined(__BORLANDC__) typedef unsigned long match_flag_type; #else typedef match_flags match_flag_type; diff --git a/include/boost/regex/v4/perl_matcher.hpp b/include/boost/regex/v4/perl_matcher.hpp index ddaafbd7..0a37a84a 100644 --- a/include/boost/regex/v4/perl_matcher.hpp +++ b/include/boost/regex/v4/perl_matcher.hpp @@ -86,7 +86,6 @@ inline bool can_start(unsigned int c, const unsigned char* map, unsigned char ma // which succeeds when it should not. // #ifndef _RWSTD_VER -#if !BOOST_WORKAROUND(BOOST_MSVC, < 1310) template inline int string_compare(const std::basic_string& s, const C* p) { @@ -97,9 +96,7 @@ inline int string_compare(const std::basic_string& s, const C* p) } return s.compare(p); } -#endif #else -#if !BOOST_WORKAROUND(BOOST_MSVC, < 1310) template inline int string_compare(const std::basic_string& s, const C* p) { @@ -110,7 +107,6 @@ inline int string_compare(const std::basic_string& s, const C* p) } return s.compare(p); } -#endif inline int string_compare(const std::string& s, const char* p) { return std::strcmp(s.c_str(), p); } # ifndef BOOST_NO_WREGEX diff --git a/include/boost/regex/v4/perl_matcher_common.hpp b/include/boost/regex/v4/perl_matcher_common.hpp index 9a80e503..a5476e6c 100644 --- a/include/boost/regex/v4/perl_matcher_common.hpp +++ b/include/boost/regex/v4/perl_matcher_common.hpp @@ -458,11 +458,7 @@ bool perl_matcher::match_word_boundary() if(position != last) { // prev and this character must be opposites: - #if defined(BOOST_REGEX_USE_C_LOCALE) && defined(__GNUC__) && (__GNUC__ == 2) && (__GNUC_MINOR__ < 95) - b = traits::isctype(*position, m_word_mask); - #else b = traits_inst.isctype(*position, m_word_mask); - #endif } else { diff --git a/include/boost/regex/v4/regex_token_iterator.hpp b/include/boost/regex/v4/regex_token_iterator.hpp index 4e8bc36f..dbb08037 100644 --- a/include/boost/regex/v4/regex_token_iterator.hpp +++ b/include/boost/regex/v4/regex_token_iterator.hpp @@ -22,7 +22,6 @@ #include #include #if (BOOST_WORKAROUND(__BORLANDC__, >= 0x560) && BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x570)))\ - || BOOST_WORKAROUND(BOOST_MSVC, < 1300) \ || BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3003)) // // Borland C++ Builder 6, and Visual C++ 6, @@ -45,10 +44,8 @@ namespace boost{ #endif #ifdef BOOST_MSVC #pragma warning(pop) -#endif -#if BOOST_WORKAROUND(BOOST_MSVC, > 1300) -# pragma warning(push) -# pragma warning(disable:4700) +#pragma warning(push) +#pragma warning(disable:4700) #endif template = 0x560) && BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x570)))\ - || BOOST_WORKAROUND(BOOST_MSVC, < 1300) \ || BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3003)) \ || BOOST_WORKAROUND(__HP_aCC, < 60700) template @@ -209,7 +205,6 @@ public: } #if !BOOST_WORKAROUND(__HP_aCC, < 60700) #if (BOOST_WORKAROUND(__BORLANDC__, >= 0x560) && BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x570)))\ - || BOOST_WORKAROUND(BOOST_MSVC, < 1300) \ || BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3003)) \ || BOOST_WORKAROUND(__HP_aCC, < 60700) template @@ -296,7 +291,6 @@ inline regex_token_iterator::const_ite { return regex_token_iterator::const_iterator, charT, traits>(p.begin(), p.end(), e, submatch, m); } -#if !BOOST_WORKAROUND(BOOST_MSVC, < 1300) template inline regex_token_iterator make_regex_token_iterator(const charT* p, const basic_regex& e, const int (&submatch)[N], regex_constants::match_flag_type m = regex_constants::match_default) { @@ -307,7 +301,6 @@ inline regex_token_iterator::const_ite { return regex_token_iterator::const_iterator, charT, traits>(p.begin(), p.end(), e, submatch, m); } -#endif template inline regex_token_iterator make_regex_token_iterator(const charT* p, const basic_regex& e, const std::vector& submatch, regex_constants::match_flag_type m = regex_constants::match_default) { @@ -319,10 +312,8 @@ inline regex_token_iterator::const_ite return regex_token_iterator::const_iterator, charT, traits>(p.begin(), p.end(), e, submatch, m); } -#if BOOST_WORKAROUND(BOOST_MSVC, > 1300) -# pragma warning(pop) -#endif #ifdef BOOST_MSVC +#pragma warning(pop) #pragma warning(push) #pragma warning(disable: 4103) #endif diff --git a/include/boost/regex/v4/regex_traits.hpp b/include/boost/regex/v4/regex_traits.hpp index f5f0402c..8b1cb6ff 100644 --- a/include/boost/regex/v4/regex_traits.hpp +++ b/include/boost/regex/v4/regex_traits.hpp @@ -83,7 +83,7 @@ struct regex_traits : public implementationT // required "standard" ones: // namespace re_detail{ -#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !BOOST_WORKAROUND(__HP_aCC, < 60000) +#if !BOOST_WORKAROUND(__HP_aCC, < 60000) BOOST_MPL_HAS_XXX_TRAIT_DEF(boost_extensions_tag) #else template @@ -136,7 +136,7 @@ struct compute_wrapper_base { typedef BaseT type; }; -#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !BOOST_WORKAROUND(__HP_aCC, < 60000) +#if !BOOST_WORKAROUND(__HP_aCC, < 60000) template struct compute_wrapper_base { diff --git a/include/boost/regex/v4/sub_match.hpp b/include/boost/regex/v4/sub_match.hpp index 34a86840..7ce8d539 100644 --- a/include/boost/regex/v4/sub_match.hpp +++ b/include/boost/regex/v4/sub_match.hpp @@ -36,7 +36,7 @@ template struct sub_match : public std::pair { typedef typename re_detail::regex_iterator_traits::value_type value_type; -#if defined(BOOST_NO_STD_ITERATOR_TRAITS) || defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) +#if defined(BOOST_NO_STD_ITERATOR_TRAITS) typedef std::ptrdiff_t difference_type; #else typedef typename re_detail::regex_iterator_traits::difference_type difference_type; @@ -50,7 +50,6 @@ struct sub_match : public std::pair sub_match() : std::pair(), matched(false) {} sub_match(BidiIterator i) : std::pair(i, i), matched(false) {} #if !defined(BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS)\ - && !BOOST_WORKAROUND(BOOST_MSVC, < 1310)\ && !BOOST_WORKAROUND(__BORLANDC__, <= 0x0551)\ && !BOOST_WORKAROUND(__DECCXX_VER, BOOST_TESTED_AT(60590042)) template diff --git a/include/boost/regex/v4/u32regex_token_iterator.hpp b/include/boost/regex/v4/u32regex_token_iterator.hpp index de167716..e8649f32 100644 --- a/include/boost/regex/v4/u32regex_token_iterator.hpp +++ b/include/boost/regex/v4/u32regex_token_iterator.hpp @@ -20,7 +20,6 @@ #define BOOST_REGEX_V4_U32REGEX_TOKEN_ITERATOR_HPP #if (BOOST_WORKAROUND(__BORLANDC__, >= 0x560) && BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x570)))\ - || BOOST_WORKAROUND(BOOST_MSVC, < 1300) \ || BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3003)) // // Borland C++ Builder 6, and Visual C++ 6, @@ -37,7 +36,7 @@ namespace boost{ #ifdef BOOST_HAS_ABI_HEADERS # include BOOST_ABI_PREFIX #endif -#if BOOST_WORKAROUND(BOOST_MSVC, > 1300) +#ifdef BOOST_MSVC # pragma warning(push) # pragma warning(disable:4700) #endif @@ -62,10 +61,7 @@ public: : end(last), re(*p), flags(f){ subs.push_back(sub); } u32regex_token_iterator_implementation(const regex_type* p, BidirectionalIterator last, const std::vector& v, match_flag_type f) : end(last), re(*p), flags(f), subs(v){} -#if BOOST_WORKAROUND(BOOST_MSVC, < 1300) - // can't reliably get this to work.... -#elif (BOOST_WORKAROUND(__BORLANDC__, >= 0x560) && BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x570)))\ - || BOOST_WORKAROUND(BOOST_MSVC, < 1300) \ +#if (BOOST_WORKAROUND(__BORLANDC__, >= 0x560) && BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x570)))\ || BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3003)) \ || BOOST_WORKAROUND(__HP_aCC, < 60700) template @@ -195,10 +191,7 @@ public: if(!pdata->init(a)) pdata.reset(); } -#if BOOST_WORKAROUND(BOOST_MSVC, < 1300) - // can't reliably get this to work.... -#elif (BOOST_WORKAROUND(__BORLANDC__, >= 0x560) && BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x570)))\ - || BOOST_WORKAROUND(BOOST_MSVC, < 1300) \ +#if (BOOST_WORKAROUND(__BORLANDC__, >= 0x560) && BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x570)))\ || BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3003)) \ || BOOST_WORKAROUND(__HP_aCC, < 60700) template @@ -299,7 +292,6 @@ inline u32regex_token_iterator make_u32regex_token_iterator(const return u32regex_token_iterator(s.getBuffer(), s.getBuffer() + s.length(), e, submatch, m); } -#if !BOOST_WORKAROUND(BOOST_MSVC, < 1300) // construction from a reference to an array: template inline u32regex_token_iterator make_u32regex_token_iterator(const char* p, const u32regex& e, const int (&submatch)[N], regex_constants::match_flag_type m = regex_constants::match_default) @@ -331,7 +323,6 @@ inline u32regex_token_iterator make_u32regex_token_iterator(const { return u32regex_token_iterator(s.getBuffer(), s.getBuffer() + s.length(), e, submatch, m); } -#endif // BOOST_MSVC < 1300 // construction from a vector of sub_match state_id's: inline u32regex_token_iterator make_u32regex_token_iterator(const char* p, const u32regex& e, const std::vector& submatch, regex_constants::match_flag_type m = regex_constants::match_default) @@ -361,7 +352,7 @@ inline u32regex_token_iterator make_u32regex_token_iterator(const return u32regex_token_iterator(s.getBuffer(), s.getBuffer() + s.length(), e, submatch, m); } -#if BOOST_WORKAROUND(BOOST_MSVC, > 1300) +#ifdef BOOST_MSVC # pragma warning(pop) #endif #ifdef BOOST_HAS_ABI_HEADERS diff --git a/include/boost/regex/v4/w32_regex_traits.hpp b/include/boost/regex/v4/w32_regex_traits.hpp index d5562072..ef934b75 100644 --- a/include/boost/regex/v4/w32_regex_traits.hpp +++ b/include/boost/regex/v4/w32_regex_traits.hpp @@ -399,7 +399,6 @@ typename w32_regex_traits_implementation::string_type return pos->second; } #if !defined(BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS)\ - && !BOOST_WORKAROUND(BOOST_MSVC, < 1300)\ && !BOOST_WORKAROUND(__BORLANDC__, <= 0x0551) std::string name(p1, p2); #else @@ -410,7 +409,6 @@ typename w32_regex_traits_implementation::string_type #endif name = lookup_default_collate_name(name); #if !defined(BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS)\ - && !BOOST_WORKAROUND(BOOST_MSVC, < 1300)\ && !BOOST_WORKAROUND(__BORLANDC__, <= 0x0551) if(name.size()) return string_type(name.begin(), name.end()); @@ -552,7 +550,7 @@ typename w32_regex_traits_implementation::char_class_type template -boost::shared_ptr > create_w32_regex_traits(::boost::re_detail::lcid_type l BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE(charT)) +boost::shared_ptr > create_w32_regex_traits(::boost::re_detail::lcid_type l) { // TODO: create a cache for previously constructed objects. return boost::object_cache< ::boost::re_detail::lcid_type, w32_regex_traits_implementation >::get(l, 5);