Boost logo

Boost :

From: Pavel Vozenilek (pavel_vozenilek_at_[hidden])
Date: 2006-03-11 21:55:12

"Václav Veselý" wrote:

> struct X
> {
> X* me; // Can points to the instance
> };
> seems to be POD, but it's not movable. The best implicit implamentation is
> probably the has_trivial_copy trait. For each other moveble type must be
> is_movable explicitly specialized. (BTW for compiler writers: compiler
> support for test a trait on all class members would be very useful for
> many
> such traits. And existing compilers with support of has_trivial_copy and
> similar traits must use this technique internally.)
> I think it worth it. For example I use optional<string> frequently. If you
> think that the is_movable trait is good enogh for Boost I would like write
> it including test and documentation.

Nonstandard Template Library ( uses
extensively this feature (

One of authors, Tomas Fidler, said that moveable has
noticeable impact on performance and that absolute majority
of classes he wrote are moveable, so he uses it as default option.


Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Unsubscribe & other changes:

Boost list run by bdawes at, gregod at, cpdaniel at, john at