|
Boost : |
From: Josh Napoli (jnapoli_at_[hidden])
Date: 2007-11-06 07:56:10
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_at_[hidden]
[mailto:boost-bounces_at_[hidden]] On Behalf Of Anthony Williams
Sent: Wednesday, October 24, 2007 7:26 AM
To: boost_at_[hidden]
Subject: Re: [boost] Boost Exception and support for cloning
"Josh Napoli" <jnapoli_at_[hidden]> 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
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk