
19 Feb
2012
19 Feb
'12
3 a.m.
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