Prazek added a comment.

In https://reviews.llvm.org/D22725#495329, @etienneb wrote:

> In https://reviews.llvm.org/D22725#494167, @Prazek wrote:
>
> > hmm It seems that I mislead you, I suck at C api - memmove source and 
> > destination can overlap, but std::move can't. So I guess you have to remove 
> > the memmove support. Sorry.
>
>
> On windows (MSVC CRT), both function are the same : memmove.


It is possible that the call to move with some trivialy copyable object would 
end up calling memmove, even if the call is wrong.

quote from http://en.cppreference.com/w/cpp/algorithm/move

> d_first       -       the beginning of the destination range. If d_first is 
> within [first, last), std::move_backward must be used instead of std::move.


But this is only the special ability of memmove, so we should not introduce 
stl-implementation dependent bugs


https://reviews.llvm.org/D22725



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to