Closed WeiqunZhang closed 5 days ago
Move instead of copy.
std::vector::erase invalidates the iterator, thus the original code has undefined behavior in principle.
Move instead of copy.
std::vector::erase invalidates the iterator, thus the original code has undefined behavior in principle.