
Here is a generic exception_ptr implementation based on a registry of exception types. (http://joshuanapoli.com/exception/) The registry is built at runtime. boost::throw_exception can register the thrown type. current_exception() searches for the most derived type in the registry that matches the current exception. (http://joshuanapoli.com/exception/jn/boost/exception/detail/emulate_exc eption_ptr.hpp) -----Original Message----- From: boost-bounces@lists.boost.org [mailto:boost-bounces@lists.boost.org] On Behalf Of Anthony Williams Sent: Wednesday, October 24, 2007 7:26 AM To: boost@lists.boost.org Subject: Re: [boost] Boost Exception and support for cloning "Josh Napoli" <jnapoli@actuality-systems.com> writes:
Mathias Gaunard wrote: C++0x has virtual constructors?
No - but exceptions (only) will get a special built-in clone mechanism (http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2179.html)
I have an implementation of this for MSVC which I intended to upload soon for boost.thread, once I'd got a generic (and thus incomplete) version working. Source code attached. Anthony -- Anthony Williams Just Software Solutions Ltd - http://www.justsoftwaresolutions.co.uk Registered in England, Company Number 5478976. Registered Office: 15 Carrallack Mews, St Just, Cornwall, TR19 7UL