- You're right, that's a bug. There is some discussion about it in the Main Page Talk section titled Search for "remove" does not show the C++ algorithm.
- Unrelated question: for
what does "incorrect operation" mean (i.e. undefined behavior, unspecified behavior, etc.)? For what types is this true? I'm having trouble finding evidence to support this claim. http://stackoverflow.com/questions/9322174/move-assignment-operator-and-if-this-rhs suggests that there is nothing in the standard that forbids self-move assignment. --Nate 14:23, 24 August 2013 (PDT)
- It's true for C++ standard library, 184.108.40.206 Function arguments [res.on.arguments]. Quotes: "implementation may assume", "impelemtation is free to optimize". (User, of course, can provide correct behaviour by implementing check in custom 'operator=(&&)') Ruslo 02:20, 25 August 2013 (PDT)
- How about: "in stl containers case, result is implementation dependent and not guarantee to be correct"? I've file a bug to libc++ to support debug check in this situation, hope this gave some clarification http://llvm.org/bugs/show_bug.cgi?id=16993 Ruslo 02:20, 25 August 2013 (PDT)
- Agreed. --Nate 11:09, 25 August 2013 (PDT)