Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2002-08-13 15:19:49

From: "Eric Woodruff" <Eric.Woodruff_at_[hidden]>

> Here's another alternative. Instead of relying on the reference-catching
> mechanism, which properly deletes behind the scenes, the user can use
> handles (shared_ptrs) of their exception they want to catch. They can
> allocate their implementation of an abstract exception type on the heap
> pass it through correctly.
> As long as the shared_ptr paradigm for hierarchical exceptions is used
> consistently, there is no problem. (That is unless the compiler has
> receiving a boost::shared_ptr<std::invalid_argument> as a
> boost::shared_ptr<std::exception>.)

What makes you think that would work? The types are not related by
inheritance any more than a std::invalid_argument* is related to

> Using the paradigm ubiquitously eliminates the fork between threaded and
> non-threaded versions of their functions and allows hierarchical
> specifications to thread<>.

it would if it worked.


           David Abrahams * Boost Consulting
dave_at_[hidden] *

Boost list run by bdawes at, gregod at, cpdaniel at, john at