|
Boost Users : |
Subject: Re: [Boost-users] How to store on exception object ?
From: Emil Dotchevski (emil_at_[hidden])
Date: 2010-09-01 02:21:59
On Tue, Aug 31, 2010 at 10:05 AM, Timothy Madden <terminatorul_at_[hidden]> wrote:
> On 8/31/2010 7:01 PM, Binglong Xie wrote:
>>
>> Does code below work correctly? (C++0x fashion)
>> =================================================================
>
> My project uses Visual Studio 2008 and these C++0x functions do not work.
> Nice to see that they are about the enter the standard, though :)
In trunk revision 65195 I've added non-intrusive (meaning, it works
for any exception object, not only the ones wrapped with
boost::enable_current_exception) exception_ptr support for MSVC 7.1
and 8.0, entirely based on an implementation Anthony Williams had
posted months ago (on other MSVC versions the intrusive support is
used as a fallback.)
Because I made some changes and I've done only limited testing, to
enable it you must #define BOOST_ENABLE_NON_INTRUSIVE_EXCEPTION_PTR.
You'll also need to link
libs/exception/src/clone_current_exception_msvc.cpp in your project.
I'm assuming MSVC 9.0 and newer will just work as soon as the
appropriate exception_info_offset value is defined in
clone_current_exception_msvc.cpp. Anthony?
Non-intrusive exception_ptr support for other compilers is now easy to
integrate in Boost Exception too. Hopefully someone can provide
suitable implementation for GCC at least (I can help with the
integration.)
Emil Dotchevski
Reverge Studios, Inc.
http://www.revergestudios.com/reblog/index.php?n=ReCode
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net