Pavel Vozenilek wrote: > "Edward Diener" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] >> Extremely dangerous and error prone. I can't even imagine a non-POD >> type where flagging it for memcpy_copyable and memcpy_moveable can >> be right. > Can >> you give an example ? >> > It is error prone but many other constructs are too. > > Example of moveable object: > > struct string_buffer { > unsigned size; > char* data; // allocated buffer > };
According to my understanding, this is a POD type. It would be unnecessary to flag this. 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. And adding a copy constructor to deal with it would remove it from POD category and make your memcpy_copyable and memcpy_moveable irrelevant for it. _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost