Boost logo

Boost :

From: Howard Hinnant (howard.hinnant_at_[hidden])
Date: 2006-03-16 09:29:50


On Mar 13, 2006, at 10:40 AM, Howard Hinnant wrote:

> "is_movable" is an overly vague name for what you're attempting to
> detect.
>
> Given a type T, a non-initialized x, and an initialized y, here is
> the sequence of statements you're optimizing.
>
> ::new(&x) T(move(y));
> y.~T();

The better name finally occurred to me this morning. If the above
were to be proposed for the C++ language, here is the syntax I would
expect:

y.~T(&x);

I.e. this is a "move destructor". The compiler could even safely
auto-generate it using the move-construct-destruct sequence. Anyway,
therefore the name I recommend is:

has_trivial_move_destructor.

-Howard


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