diff --git a/configure.in b/configure.in index 2935237c..dde4fc15 100644 --- a/configure.in +++ b/configure.in @@ -921,39 +921,6 @@ have_std_namespace="yes" [AC_MSG_RESULT(no - either STL is not present or in a non-standard namespace.) AC_MSG_ERROR([Sorry, you can't compile this library unless the standard library is in namespace std.])]) -AC_MSG_CHECKING(for ) -AC_TRY_COMPILE( -[ -#include -#include "confdefs.h" - -class bad_expression : public std::exception -{ - unsigned int code; -public: - bad_expression(unsigned int err) : code(err) {} - bad_expression(const bad_expression& e) : std::exception(e), code(e.code) {} - bad_expression& operator=(const bad_expression& e) - { - std::exception::operator=(e); - code = e.code; - return *this; - } - virtual const char* what()const throw(); -}; - - -std::exception e; -std::bad_exception e3; -], -[ -], -[AC_MSG_RESULT(yes) -], -[AC_MSG_RESULT(no) -AC_DEFINE(BOOST_RE_NO_EXCEPTION_H, []) -]) - AC_MSG_CHECKING(for ) AC_TRY_COMPILE( [ diff --git a/demo/regress/tests.cpp b/demo/regress/tests.cpp index b50a895c..efdca26c 100644 --- a/demo/regress/tests.cpp +++ b/demo/regress/tests.cpp @@ -613,7 +613,6 @@ void run_tests() re_type e(expression.c_str(), f); cpp_tests(e, true); } - #ifndef BOOST_RE_NO_EXCEPTION_H catch(const std::exception& e) { // @@ -624,7 +623,6 @@ void run_tests() cout << "Unexpected exception thrown from C++ library: " << e.what() << endl; } } - #endif catch(...) { begin_error(); diff --git a/demo/regress/wregex_test.cpp b/demo/regress/wregex_test.cpp index bee8a293..4c549cbf 100644 --- a/demo/regress/wregex_test.cpp +++ b/demo/regress/wregex_test.cpp @@ -26,6 +26,18 @@ // disable automatic selection of support library: #define BOOST_RE_NO_LIB +#if defined(_MSC_VER) && defined(__STL_DEBUG) && defined(_DLL) +// +// Ugly hack: +// when this file is built with VC6 + STLPort 4 we get unresolved externals +// from std::wstring if __STL_DEBUG is defined. As a workaround disable +// STL debugging support in this case. This weakens the regression tests +// but is still better than not being able to run them at all. This should be +// removed once STLPort gets fixed. +// +#undef __STL_DEBUG +#endif + #include #ifdef BOOST_RE_NO_WCSTRING @@ -163,7 +175,6 @@ template test_string_type regex_merge(const test_string_type&, #endif - } // namespace boost // diff --git a/include/boost/pattern_except.hpp b/include/boost/pattern_except.hpp index 31e5727a..2fc8e525 100644 --- a/include/boost/pattern_except.hpp +++ b/include/boost/pattern_except.hpp @@ -23,7 +23,7 @@ #ifndef BOOST_RE_PAT_EXCEPT_HPP #define BOOST_RE_PAT_EXCEPT_HPP -#include +#include namespace boost{ diff --git a/include/boost/re_detail/regex_config.hpp b/include/boost/re_detail/regex_config.hpp index 507e0cfc..e8d9f315 100644 --- a/include/boost/re_detail/regex_config.hpp +++ b/include/boost/re_detail/regex_config.hpp @@ -87,34 +87,7 @@ Do not change this file unless you really really have to, add options to #define BOOST_RE_NO_MUTABLE #endif - #if __BORLANDC__ < 0x520 - #define BOOST_RE_NO_WCSTRING - #define BOOST_RE_NO_INT64 - // Early versions of Borlands namespace code can't cope with iterators - // that are in different namespaces from STL code. - #define boost std - #define BOOST_RE_NO_NOT_EQUAL - #endif - - #if __BORLANDC__ < 0x530 - #define BOOST_RE_NO_WCTYPE_H - #define BOOST_RE_NO_WCHAR_H - #define BOOST_RE_OLD_IOSTREAM - #define BOOST_RE_NO_TRICKY_DEFAULT_PARAM - #define BOOST_RE_NO_EXCEPTION_H - #ifndef __WIN32__ - #define BOOST_RE_NO_WCSTRING - #endif - #define BOOST_RE_NO_LOCALE_H - #define BOOST_RE_NO_TEMPLATE_RETURNS - // - // this is a hack to get around buggy namespace support in the - // 0x520 compiler version - #define BOOST_RE_NO_USING - #define BOOST_RE_USING_HACK - #define BOOST_RE_OLD_IOSTREAM - #endif - + // versions prior to 0x530 not supported: #if __BORLANDC__ < 0x540 #define BOOST_RE_NO_MEMBER_TEMPLATES // inline contructors exhibit strange behaviour @@ -267,9 +240,6 @@ Do not change this file unless you really really have to, add options to #define BOOST_RE_NO_PARTIAL_FUNC_SPEC #define BOOST_RE_NO_TEMPLATE_FRIEND #endif - #ifndef __STL_USE_NAMESPACES - //#define BOOST_RE_NO_EXCEPTION_H - #endif #define BOOST_RE_INT64t long long #define BOOST_RE_IMM64(val) val##LL @@ -309,9 +279,6 @@ Do not change this file unless you really really have to, add options to #define BOOST_RE_NO_MEMBER_TEMPLATES #define BOOST_RE_OLD_IOSTREAM #endif - #ifndef __STL_USE_NAMESPACES - #define BOOST_RE_NO_EXCEPTION_H - #endif #define BOOST_RE_INT64t long long #define BOOST_RE_IMM64(val) val##LL #define BOOST_RE_NESTED_TEMPLATE_DECL @@ -327,17 +294,11 @@ Do not change this file unless you really really have to, add options to #define BOOST_RE_NO_NAMESPACES #define BOOST_RE_NO_MUTABLE #define BOOST_RE_OLD_IOSTREAM - #ifndef __STL_USE_NAMESPACES - #define BOOST_RE_NO_EXCEPTION_H - #endif #define BOOST_RE_NESTED_TEMPLATE_DECL #define BOOST_RE_NO_TEMPLATE_FRIEND #else #if !defined(_NAMESPACE_STD) #define BOOST_RE_OLD_IOSTREAM - #ifndef __STL_USE_NAMESPACES - #define BOOST_RE_NO_EXCEPTION_H - #endif #endif #define BOOST_RE_NESTED_TEMPLATE_DECL template #endif @@ -434,17 +395,8 @@ typedef unsigned long jm_uintfast32_t; /* STL configuration goes here: */ #ifndef BOOST_RE_AUTO_CONFIGURE -#ifdef BOOST_RE_NO_STL - #define BOOST_RE_NO_EXCEPTION_H - #define BOOST_RE_NO_ITERATOR_H - #define BOOST_RE_NO_MEMORY_H - #define BOOST_RE_NO_LOCALE_H - #define BOOST_RE_NO_STRING_H -#endif -#ifndef BOOST_RE_NO_EXCEPTION_H - #include -#endif +#include #ifndef BOOST_RE_NO_ITERATOR_H #include diff --git a/include/boost/re_detail/regex_options.hpp b/include/boost/re_detail/regex_options.hpp index 615a215b..f1b060b8 100644 --- a/include/boost/re_detail/regex_options.hpp +++ b/include/boost/re_detail/regex_options.hpp @@ -124,10 +124,6 @@ /* STL options: */ -/* BOOST_RE_NO_EXCEPTION_H Define if you do not a compliant - header file. */ -/* #define BOOST_RE_NO_EXCEPTION_H */ - /* BOOST_RE_NO_ITERATOR_H Define if you do not have a version of . */ /* #define BOOST_RE_NO_ITERATOR_H */ diff --git a/jm_opt.in b/jm_opt.in index 1b86792d..ad2b32ef 100644 --- a/jm_opt.in +++ b/jm_opt.in @@ -124,10 +124,6 @@ /* STL options: */ -/* BOOST_RE_NO_EXCEPTION_H Define if you do not a compliant - header file. */ -#undef BOOST_RE_NO_EXCEPTION_H - /* BOOST_RE_NO_ITERATOR_H Define if you do not have a version of . */ #undef BOOST_RE_NO_ITERATOR_H @@ -419,9 +415,7 @@ syntax error #endif -#ifndef BOOST_RE_NO_EXCEPTION_H -#include -#endif +#include #ifndef BOOST_RE_NO_ITERATOR_H #include