Boost logo

Boost :

Subject: Re: [boost] Updated boost::base_from_member for C++2011
From: Michel Morin (mimomorin_at_[hidden])
Date: 2012-02-22 09:24:47


Daryle Walker wrote:
>> As per N3204 (clang already implemented this),
>> with the following type
>>
>> struct type
>> {
>> type() noexcept;
>> ~type() { throw 0; }
>> };
>>
>> `noexcept(type())` should return true,
>> despite the fact that the destructor throws.
>
> Explicitly adding a "noexcept(false)" to the destructor (which may be a good idea)
> would change "noexcept(type())" to false, right?

Right!

> The global-void*-new method should
> never consider the destructor in noexcept evalutations.

This seems the right way.
Dave also suggested to use placement new in libstdc++'s <type_traits>.
    http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51452

Regards,
Michel


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