15 changes: 3 additions & 12 deletions include/boost/regex/v4/regex_token_iterator.hpp
Expand Up @@ -22,7 +22,6 @@
#include <boost/shared_ptr.hpp>
#include <boost/detail/workaround.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,
Expand All @@ -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 <class BidirectionalIterator,
Expand All @@ -75,7 +72,6 @@ class regex_token_iterator_implementation
: end(last), re(*p), flags(f), subs(v){}
#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 <class T>
Expand Down Expand Up @@ -209,7 +205,6 @@ class regex_token_iterator
}
#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 <class T>
Expand Down Expand Up @@ -296,7 +291,6 @@ inline regex_token_iterator<typename std::basic_string<charT, ST, SA>::const_ite
{
return regex_token_iterator<typename std::basic_string<charT, ST, SA>::const_iterator, charT, traits>(p.begin(), p.end(), e, submatch, m);
}
#if !BOOST_WORKAROUND(BOOST_MSVC, < 1300)
template <class charT, class traits, std::size_t N>
inline regex_token_iterator<const charT*, charT, traits> make_regex_token_iterator(const charT* p, const basic_regex<charT, traits>& e, const int (&submatch)[N], regex_constants::match_flag_type m = regex_constants::match_default)
{
Expand All @@ -307,7 +301,6 @@ inline regex_token_iterator<typename std::basic_string<charT, ST, SA>::const_ite
{
return regex_token_iterator<typename std::basic_string<charT, ST, SA>::const_iterator, charT, traits>(p.begin(), p.end(), e, submatch, m);
}
#endif
template <class charT, class traits>
inline regex_token_iterator<const charT*, charT, traits> make_regex_token_iterator(const charT* p, const basic_regex<charT, traits>& e, const std::vector<int>& submatch, regex_constants::match_flag_type m = regex_constants::match_default)
{
Expand All @@ -319,10 +312,8 @@ inline regex_token_iterator<typename std::basic_string<charT, ST, SA>::const_ite
return regex_token_iterator<typename std::basic_string<charT, ST, SA>::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
Expand Down
4 changes: 2 additions & 2 deletions include/boost/regex/v4/regex_traits.hpp
Expand Up @@ -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<class T>
Expand Down Expand Up @@ -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 <class BaseT>
struct compute_wrapper_base<BaseT, false>
{
Expand Down
3 changes: 1 addition & 2 deletions include/boost/regex/v4/sub_match.hpp
Expand Up @@ -36,7 +36,7 @@ template <class BidiIterator>
struct sub_match : public std::pair<BidiIterator, BidiIterator>
{
typedef typename re_detail::regex_iterator_traits<BidiIterator>::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<BidiIterator>::difference_type difference_type;
Expand All @@ -50,7 +50,6 @@ struct sub_match : public std::pair<BidiIterator, BidiIterator>
sub_match() : std::pair<BidiIterator, BidiIterator>(), matched(false) {}
sub_match(BidiIterator i) : std::pair<BidiIterator, BidiIterator>(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 <class T, class A>
Expand Down
17 changes: 4 additions & 13 deletions include/boost/regex/v4/u32regex_token_iterator.hpp
Expand Up @@ -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,
Expand All @@ -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
Expand All @@ -62,10 +61,7 @@ class u32regex_token_iterator_implementation
: end(last), re(*p), flags(f){ subs.push_back(sub); }
u32regex_token_iterator_implementation(const regex_type* p, BidirectionalIterator last, const std::vector<int>& 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 <class T>
Expand Down Expand Up @@ -195,10 +191,7 @@ class u32regex_token_iterator
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 <class T>
Expand Down Expand Up @@ -299,7 +292,6 @@ inline u32regex_token_iterator<const UChar*> make_u32regex_token_iterator(const
return u32regex_token_iterator<const UChar*>(s.getBuffer(), s.getBuffer() + s.length(), e, submatch, m);
}

#if !BOOST_WORKAROUND(BOOST_MSVC, < 1300)
// construction from a reference to an array:
template <std::size_t N>
inline u32regex_token_iterator<const char*> make_u32regex_token_iterator(const char* p, const u32regex& e, const int (&submatch)[N], regex_constants::match_flag_type m = regex_constants::match_default)
Expand Down Expand Up @@ -331,7 +323,6 @@ inline u32regex_token_iterator<const UChar*> make_u32regex_token_iterator(const
{
return u32regex_token_iterator<const UChar*>(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<const char*> make_u32regex_token_iterator(const char* p, const u32regex& e, const std::vector<int>& submatch, regex_constants::match_flag_type m = regex_constants::match_default)
Expand Down Expand Up @@ -361,7 +352,7 @@ inline u32regex_token_iterator<const UChar*> make_u32regex_token_iterator(const
return u32regex_token_iterator<const UChar*>(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
Expand Down
4 changes: 1 addition & 3 deletions include/boost/regex/v4/w32_regex_traits.hpp
Expand Up @@ -399,7 +399,6 @@ typename w32_regex_traits_implementation<charT>::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
Expand All @@ -410,7 +409,6 @@ typename w32_regex_traits_implementation<charT>::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());
Expand Down Expand Up @@ -552,7 +550,7 @@ typename w32_regex_traits_implementation<charT>::char_class_type


template <class charT>
boost::shared_ptr<const w32_regex_traits_implementation<charT> > create_w32_regex_traits(::boost::re_detail::lcid_type l BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE(charT))
boost::shared_ptr<const w32_regex_traits_implementation<charT> > 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<charT> >::get(l, 5);
Expand Down