[C++-sig] Re: Boost.Python in SUSE 9.0 or SUSE 9.1?

David Abrahams dave at boost-consulting.com
Wed Jul 7 15:25:33 CEST 2004

"Ralf W. Grosse-Kunstleve" <rwgk at yahoo.com> writes:

> --- Chris Hoeppler <hoeppler at diener.iap.physik.uni-tuebingen.de> wrote:
>> I just checked this for gcc-3.3.4 and gcc-3.4.0 (official), and
>> gcc-3.3.1 (as shipped by SuSE 8.2) So it will have to be non-SuSE gcc's
>> for the time being...
> Oh, sorry, I didn't see this before sending the other message a minute ago.
> Please disregard the other message.
> Ralf

Here's what you do.  You use that nasty preprocessor condition to
switch in this code:

  template <class ExceptionType, class Translate>
  struct translate_exception
      typedef typename remove_reference<
          typename add_const<ExceptionType>::type
      >::type exception_non_ref;

      inline bool operator()(
          exception_handler const& handler
        , function0<void> const& f
        , typename call_traits<Translate>::param_type translate) const
              return handler(f);
          catch(exception_non_ref& e)
              return true;

Then you test it thoroughly.

Dave Abrahams
Boost Consulting

More information about the Cplusplus-sig mailing list