From f141de61ec19c7680118c2573dcb85e3153d51ca Mon Sep 17 00:00:00 2001 From: John Maddock Date: Thu, 28 Oct 2004 11:27:07 +0000 Subject: [PATCH] Compiler workarounds. [SVN r25915] --- include/boost/regex/v4/instances.hpp | 5 ++++- test/regress/test_operators.cpp | 28 +++++++++++++++++++++++----- 2 files changed, 27 insertions(+), 6 deletions(-) diff --git a/include/boost/regex/v4/instances.hpp b/include/boost/regex/v4/instances.hpp index 5c078df2..540d3586 100644 --- a/include/boost/regex/v4/instances.hpp +++ b/include/boost/regex/v4/instances.hpp @@ -70,8 +70,11 @@ template class BOOST_REGEX_DECL basic_regex< BOOST_REGEX_CHAR_T >; template class BOOST_REGEX_DECL basic_regex< BOOST_REGEX_CHAR_T >; template class BOOST_REGEX_DECL match_results< const BOOST_REGEX_CHAR_T* >; -template class BOOST_REGEX_DECL match_results< std::basic_string::const_iterator >; template class BOOST_REGEX_DECL ::boost::re_detail::perl_matcher::allocator_type, boost::regex_traits >; +#if !(defined(BOOST_DINKUMWARE_STDLIB) && (BOOST_DINKUMWARE_STDLIB <= 1)) +template class BOOST_REGEX_DECL match_results< std::basic_string::const_iterator >; +template class BOOST_REGEX_DECL ::boost::re_detail::perl_matcher< std::basic_string::const_iterator, match_results< std::basic_string::const_iterator >::allocator_type, boost::regex_traits >; +#endif # ifdef BOOST_MSVC diff --git a/test/regress/test_operators.cpp b/test/regress/test_operators.cpp index 010b090b..87c0fda6 100644 --- a/test/regress/test_operators.cpp +++ b/test/regress/test_operators.cpp @@ -1,6 +1,8 @@ #include "test.hpp" +#if !BOOST_WORKAROUND(BOOST_MSVC, <= 1300) && !BOOST_WORKAROUND(__HP_aCC, BOOST_TESTED_AT(55500)) + template void test_less(const T1& t1, const T2& t2) { @@ -121,26 +123,42 @@ void test_operators() test_less(sub1, *s2.c_str()); test_less(*s1.c_str(), sub2); test_less(sub1, s2); - //test_less(s1, sub2); + test_less(s1, sub2); test_greater(sub2, sub1); test_greater(sub2, s1.c_str()); test_greater(s2.c_str(), sub1); test_greater(sub2, *s1.c_str()); test_greater(*s2.c_str(), sub1); test_greater(sub2, s1); - //test_greater(s2, sub1); + test_greater(s2, sub1); test_equal(sub1, sub1); test_equal(sub1, s1.c_str()); test_equal(s1.c_str(), sub1); test_equal(sub1, *s1.c_str()); test_equal(*s1.c_str(), sub1); test_equal(sub1, s1); - //test_equal(s1, sub1); + test_equal(s1, sub1); test_plus(sub2, sub1, "ba"); test_plus(sub2, s1.c_str(), "ba"); test_plus(s2.c_str(), sub1, "ba"); test_plus(sub2, *s1.c_str(), "ba"); test_plus(*s2.c_str(), sub1, "ba"); test_plus(sub2, s1, "ba"); - //test_plus(s2, sub1, "ba"); -} \ No newline at end of file + test_plus(s2, sub1, "ba"); +} + +#else + +#include + +void test_operators() +{ + std::cout << + "\n\n" + "This compiler version does not support the sub_match comparison operators\n" + "tests for these operators are not carried out\n" + "\n"; +} + +#endif +