Boost logo

Boost :

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


Thanks for the explanation, Daryle.

Daryle Walker wrote:
> However, every operation required for a noexcept expression is considered,
> including any destructor calls for temporary objects.
> That's why there's a "declval," after all.
> We need to call a constructor without a corresponding destructor,
> and the placement-new syntax (in a no-throw version) does that.
> The variant used is one of the few that's illegal to override.

In `MemberType(static_cast<T&&>(x)…)`,
I don't see any any destruction of temporaries, since there are
no temporaries involved in `static_cast<T&&>(x)…`.
Maybe I'm missing something. Could you elaborate on this?

Regards,
Michel


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