
"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 (http://www.ntllib.org/) uses extensively this feature (http://www.ntllib.org/moveable.html). 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. /Pavel _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost