With the review copy against memcpy vs memmove (. Great information here, by the way) I have read, and that would be it seems to me that , in contrast to what is said in a conversation, for example, cppreference Note: memcpy was changed to memmove since the adoption of this quote . -
Notes
In practice, implementations std::copyavoid multiple assignments and use bulk copy functions such as std::memcpyif the value typeTriviallyCopyable
- std::copy(and std::copy_backward) cannot be implemented in terms memcopy, because for std::copyonly the beginning of the destination range should not fall into the original range, but for memcpyall ranges should not overlap.
Looking at the implementation of Visual-C ++ (see the header xutility), we can also notice that VC ++ uses memmove , but now we have more relaxed requirements than std::copy:
... Objects can overlap: copying occurs as if the characters were copied to a temporary array of characters, and then the characters were copied from the array ...
, , std::copy memcpy , memmove . ( , , , )
(-): ? ? , , memcpy, std::copy, .. memcpy, , std::copy?