----- Original Message ----- From: "Andrei Alexandrescu" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, November 20, 2002 8:44 PM Subject: [boost] Re: Do we need a boost_exception class or idiom?
> "David Abrahams" <[EMAIL PROTECTED]> wrote in message > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > [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 > } > Your are absolutely right, and boost::throw_exception is precisely a non-member raise. So I take back my strong encouragement (...each time I strongly say something it turns out to be wrong. :-o ) The actual point was that code shouldn't just use a throw expression directly. > Andrei Fernando Cacciola _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost