"Edward Diener" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] ... > But even for a POD type such as this, copying would lead to > errors if the char * data were dynamically allocated since a double delete > would probably be done. > Containers aware of memcpy_moveable can detect this flag and avoid double delete problems. Other code would use constructors/destructors as usual.
Intention is to give user chance to flag performance sensitive types. Commonly used containers/algorithms (typically vector) would be able to take advantage of this. This soulution would work with current compilers and could be useful for performance optimisation phase of a project. Code using memcpy_moveable<> can play some tricks to help troubleshooting (like filling old storage with debug bit pattern). memcpy_moveable<> cannot be deduced by compiler automatically, IMO - that's real disadvantage. Also memcpy_moveable<> is intended for situations where large arrays of objects are moved, like vector<> reallocations. It is something different and likely orthogonal to Mojo or standard move proposals. /Pavel _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost