From c2de12f1133e8ad7537021bbfc38aaeb07599a2c Mon Sep 17 00:00:00 2001 From: John Maddock Date: Wed, 18 May 2005 11:44:12 +0000 Subject: [PATCH] Disable features that HP aCC can't cope with (gets basic regression tests passing with aCC). [SVN r29032] --- include/boost/regex/v4/perl_matcher.hpp | 2 ++ include/boost/regex/v4/regex_token_iterator.hpp | 5 ++++- include/boost/regex/v4/regex_traits_defaults.hpp | 4 +++- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/include/boost/regex/v4/perl_matcher.hpp b/include/boost/regex/v4/perl_matcher.hpp index 58f16873..8e9a4080 100644 --- a/include/boost/regex/v4/perl_matcher.hpp +++ b/include/boost/regex/v4/perl_matcher.hpp @@ -49,12 +49,14 @@ inline bool can_start(unsigned short c, const unsigned char* map, unsigned char { return ((c >= (1 << CHAR_BIT)) ? true : map[c] & mask); } +#if !defined(__HP_aCC) #if defined(WCHAR_MIN) && (WCHAR_MIN == 0) && !defined(BOOST_NO_INTRINSIC_WCHAR_T) inline bool can_start(wchar_t c, const unsigned char* map, unsigned char mask) { return ((c >= (1 << CHAR_BIT)) ? true : map[c] & mask); } #endif +#endif // diff --git a/include/boost/regex/v4/regex_token_iterator.hpp b/include/boost/regex/v4/regex_token_iterator.hpp index 91aa286f..592944fa 100644 --- a/include/boost/regex/v4/regex_token_iterator.hpp +++ b/include/boost/regex/v4/regex_token_iterator.hpp @@ -65,6 +65,7 @@ public: : end(last), re(*p), flags(f){ subs.push_back(sub); } regex_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(__HP_aCC, BOOST_TESTED_AT(55500)) #if (BOOST_WORKAROUND(__BORLANDC__, >= 0x560) && BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x570)))\ || BOOST_WORKAROUND(BOOST_MSVC, < 1300) \ || BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3003)) \ @@ -92,7 +93,7 @@ public: } } #endif - +#endif bool init(BidirectionalIterator first) { N = 0; @@ -196,6 +197,7 @@ public: if(!pdata->init(a)) pdata.reset(); } +#if !BOOST_WORKAROUND(__HP_aCC, BOOST_TESTED_AT(55500)) #if (BOOST_WORKAROUND(__BORLANDC__, >= 0x560) && BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x570)))\ || BOOST_WORKAROUND(BOOST_MSVC, < 1300) \ || BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3003)) \ @@ -217,6 +219,7 @@ public: if(!pdata->init(a)) pdata.reset(); } +#endif #endif regex_token_iterator(const regex_token_iterator& that) : pdata(that.pdata) {} diff --git a/include/boost/regex/v4/regex_traits_defaults.hpp b/include/boost/regex/v4/regex_traits_defaults.hpp index 4d41fa24..095c2b35 100644 --- a/include/boost/regex/v4/regex_traits_defaults.hpp +++ b/include/boost/regex/v4/regex_traits_defaults.hpp @@ -77,7 +77,8 @@ inline bool is_combining(unsigned char) { return false; } -#ifdef _MSC_VER +#ifndef __HP_aCC +#ifdef _MSC_VER template<> inline bool is_combining(wchar_t c) { @@ -98,6 +99,7 @@ inline bool is_combining(wchar_t c) } #endif #endif +#endif // // is a charT c a line separator?