Boost logo

Boost :

Subject: Re: [boost] [exception] library update
From: vicente.botet (vicente.botet_at_[hidden])
Date: 2008-09-10 15:24:49


----- Original Message -----
From: "Peter Dimov" <pdimov_at_[hidden]>
To: <boost_at_[hidden]>
Sent: Wednesday, September 10, 2008 1:13 PM
Subject: Re: [boost] [exception] library update

>
> vicente.botet:
>
>> So why to define a template in the case BOOST_NO_EXCEPTIONS is not
>> defined?
>
> Try to define it as a non-template and see what happens.

OK, I see, a runtime error.

So why not let define the user the template when BOOST_NO_EXCEPTIONS is
defined. omething like

#ifdef BOOST_NO_EXCEPTIONS

#ifdef BOOST_NO_EXCEPTIONS_USER_SLOT

#include BOOST_NO_EXCEPTIONS_USER_SLOT

#endif // BOOST_NO_EXCEPTIONS_USER_SLOT

void throw_exception(std::exception const & e);

#else // BOOST_NO_EXCEPTIONS

template<class E> void throw_exception(E const & e)
{
    throw e;
}

#endif // BOOST_NO_EXCEPTIONS

Vicente


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk