Boost logo

Boost :

From: Eric Woodruff (Eric.Woodruff_at_[hidden])
Date: 2002-08-14 12:37:02


Also note that some may believe since boost provides threading and there is
an opportunity to support the exceptions thrown anywhere in the STL, then
boost would have to provide the wrapper (and a way to disable it) at that
boundary point. Why leave it to the end user?

----- Original Message -----
From: Eric Woodruff
Newsgroups: gmane.comp.lib.boost.devel
Sent: Wednesday, 2002:August:14 12:36 PM
Subject: Re: Re: Re: Re: Re: Re: Threads & Exceptions

The templated copy constructor emulates pointer conventions for related
types, and generally the important relation is inheritance.

I'm not assuming the code that throws can be modified. As I've said, in a
different message, the code that throws doesn't need to be modified. But, at
the boundary point between a library that uses the wrong paradigm, the
exceptions can be enumerated and rethrown to comply with the new paradigm.
(This boundary point only need to be maintained as the foundational library
changes, which is likely rarely.)

----- Original Message -----
From: Peter Dimov
Newsgroups: gmane.comp.lib.boost.devel
Sent: Wednesday, 2002:August:14 7:46 AM
Subject: Re: Re: Re: Re: Re: Re: Threads & Exceptions

From: "Eric Woodruff" <Eric.Woodruff_at_[hidden]>
> Do you not see the shared_ptr policies as being useful, or even necessary
> sometimes? The templated copy constructor is an attempt at faking
> inheritance.

Wrong. The templated copy constructor emulates standard pointer conversions,
not inheritance.

> Personally, I think it would fix all of the exception issues. Many things
> revolve around shared_ptr in my opinion (I also think that there should be
a
> shared_ptr boost::New<> as I've probably mentioned before.)
>
>
> I hate to give away my evil scheme but...
>
> My ideal usage would be to
>
> throw boost::New<std::invalid_argument> ("opinions are subjective");

This assumes that you can modify the code that throws. If you can, you
probably can modify the exception class to inherit from clonable_exception
(or whatever.)

_______________________________________________
Unsubscribe & other changes:
http://lists.boost.org/mailman/listinfo.cgi/boost

_______________________________________________
Unsubscribe & other changes:
http://lists.boost.org/mailman/listinfo.cgi/boost


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