mirror of
https://github.com/boostorg/python.git
synced 2026-01-23 17:52:17 +00:00
workaround for broken gcc that ships with SuSE 9.0 and SuSE 9.1
[SVN r23411]
This commit is contained in:
@@ -22,9 +22,20 @@ namespace boost { namespace python { namespace detail {
|
||||
template <class ExceptionType, class Translate>
|
||||
struct translate_exception
|
||||
{
|
||||
// workaround for broken gcc that ships with SuSE 9.0 and SuSE 9.1
|
||||
# if defined(__linux__) && defined(__GNUC__) \
|
||||
&& BOOST_WORKAROUND(__GNUC__, == 3) \
|
||||
&& BOOST_WORKAROUND(__GNUC_MINOR__, == 3) \
|
||||
&& (BOOST_WORKAROUND(__GNUC_PATCHLEVEL__, == 1) \
|
||||
|| BOOST_WORKAROUND(__GNUC_PATCHLEVEL__, == 3))
|
||||
typedef typename remove_reference<
|
||||
typename add_const<ExceptionType>::type
|
||||
>::type exception_non_ref;
|
||||
# else
|
||||
typedef typename add_reference<
|
||||
typename add_const<ExceptionType>::type
|
||||
>::type exception_cref;
|
||||
# endif
|
||||
|
||||
inline bool operator()(
|
||||
exception_handler const& handler
|
||||
@@ -35,7 +46,16 @@ struct translate_exception
|
||||
{
|
||||
return handler(f);
|
||||
}
|
||||
// workaround for broken gcc that ships with SuSE 9.0 and SuSE 9.1
|
||||
# if defined(__linux__) && defined(__GNUC__) \
|
||||
&& BOOST_WORKAROUND(__GNUC__, == 3) \
|
||||
&& BOOST_WORKAROUND(__GNUC_MINOR__, == 3) \
|
||||
&& (BOOST_WORKAROUND(__GNUC_PATCHLEVEL__, == 1) \
|
||||
|| BOOST_WORKAROUND(__GNUC_PATCHLEVEL__, == 3))
|
||||
catch(exception_non_ref& e)
|
||||
# else
|
||||
catch(exception_cref e)
|
||||
# endif
|
||||
{
|
||||
translate(e);
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user