forked from boostorg/regex
Misc regex fixes: removed BOOST_RE_NO_EXCEPTION_H macro (no longer needed), added hack for VC6+STLPort regression test (missing wstring exports in STLPort dll).
[SVN r9555]
This commit is contained in:
33
configure.in
33
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 <exception>)
|
||||
AC_TRY_COMPILE(
|
||||
[
|
||||
#include <exception>
|
||||
#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 <iterator>)
|
||||
AC_TRY_COMPILE(
|
||||
[
|
||||
|
@ -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();
|
||||
|
@ -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 <boost/regex.hpp>
|
||||
|
||||
#ifdef BOOST_RE_NO_WCSTRING
|
||||
@ -163,7 +175,6 @@ template test_string_type regex_merge(const test_string_type&,
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
} // namespace boost
|
||||
|
||||
//
|
||||
|
@ -23,7 +23,7 @@
|
||||
#ifndef BOOST_RE_PAT_EXCEPT_HPP
|
||||
#define BOOST_RE_PAT_EXCEPT_HPP
|
||||
|
||||
#include <stdexcept>
|
||||
#include <boost/re_detail/regex_config.hpp>
|
||||
|
||||
namespace boost{
|
||||
|
||||
|
@ -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 <exception>
|
||||
#endif
|
||||
#include <stdexcept>
|
||||
|
||||
#ifndef BOOST_RE_NO_ITERATOR_H
|
||||
#include <iterator>
|
||||
|
@ -124,10 +124,6 @@
|
||||
|
||||
/* STL options: */
|
||||
|
||||
/* BOOST_RE_NO_EXCEPTION_H Define if you do not a compliant <exception>
|
||||
header file. */
|
||||
/* #define BOOST_RE_NO_EXCEPTION_H */
|
||||
|
||||
/* BOOST_RE_NO_ITERATOR_H Define if you do not have a version of <iterator>. */
|
||||
/* #define BOOST_RE_NO_ITERATOR_H */
|
||||
|
||||
|
@ -124,10 +124,6 @@
|
||||
|
||||
/* STL options: */
|
||||
|
||||
/* BOOST_RE_NO_EXCEPTION_H Define if you do not a compliant <exception>
|
||||
header file. */
|
||||
#undef BOOST_RE_NO_EXCEPTION_H
|
||||
|
||||
/* BOOST_RE_NO_ITERATOR_H Define if you do not have a version of <iterator>. */
|
||||
#undef BOOST_RE_NO_ITERATOR_H
|
||||
|
||||
@ -419,9 +415,7 @@ syntax error
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef BOOST_RE_NO_EXCEPTION_H
|
||||
#include <exception>
|
||||
#endif
|
||||
#include <stdexcept>
|
||||
|
||||
#ifndef BOOST_RE_NO_ITERATOR_H
|
||||
#include <iterator>
|
||||
|
Reference in New Issue
Block a user