"John Maddock" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > He needs to take a look at the has_trivial_* traits: > > has_trivial_assign is roughly equivalent to memcpy_copyable > > I guess there is no equivalent to memcpy_moveable: but it looks rather > dangerous, > It looks dangerous but the memcpy_moveable is intended for containers designed to deal with this danger.
(The problem can be a bit alleviated (in debug mode) by overwriting old storage by 0xCC bit pattern, making invalid use easier to spot.) Combination of is_POD and has_trivial_* covers many cases for memcpy_moveable but not all of them, IMO. Also the has_trivial_* are not yet supported by compilers. My intention was to give user chance to flag moveable types manually. Those causing performance bottleneck could be examined and flagged without need to change container/algorithm/architecture. Performance optimization is often targeted after system gets built and being able to improve it without major design changes looks useful. /Pavel _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
