Boost logo

Boost :

From: Andrei Alexandrescu (andrewalex_at_[hidden])
Date: 2002-11-20 18:44:28


"David Abrahams" <dave_at_[hidden]> wrote in message
news:u1y5fkj50.fsf_at_boost-consulting.com...
[snip]
> This seems like a very bad solution. It requires solving the
> forwarding constructor problem, for one thing. boost::throw_exception
> doesn't have that problem.

I don't know about boost::throw_exception, but a nonmenber should be
generally preferred to a member. Thus, I find the solution based on member
raise poor. An equivalent free function can be written:

template <class T>
void raise(const T& exc)
{
    #ifdef ...
        throw exc;
    #endif
}

Andrei


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