Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2002-08-10 10:33:30


From: "Peter Dimov" <pdimov_at_[hidden]>

> From: "John Maddock" <jm_at_[hidden]>
> > >I propose the following alternative to your patch:
> > >
> > >* New header boost/throw.hpp:
> > >
> > >#ifdef BOOST_NO_EXCEPTIONS
> > >
> > >#include <exception>
> > >
> > >void boost_throw(std::exception const & e); // user defined
> > >
> > >#else
> > >
> > >template<class E> void boost_throw(E const & e)
> > >{
> > > throw e;
> > >}
> > >
> > >#endif
> >
> > Doesn't that throw a std::exception, rather than the "real" class type?
>
> No. You can't throw an exception when exceptions aren't supported.

Oops. Peter's right, of course.

-----------------------------------------------------------
           David Abrahams * Boost Consulting
dave_at_[hidden] * http://www.boost-consulting.com


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