`copy` has to cope with self-copying
Closed this issue · 1 comments
dangelog commented
Can I concatenate a vector to itself using copy
?
std::vector<int> v{1, 2, 3};
KDAlgorithms::copy(v, v); // duplicate it
The current answer is "maybe", which is a bad answer. If you want this to be a precondition, it should be documented (and assert()ed, e.g. assert(&input != &output)
).
jesperkdab commented
Was fixed back in November.