R
Richard Herring
In message <[email protected]>, Victor Bazarov
[of std::remove_if]
No, it copies the elements not to be removed to the beginning. Nothing
is said about the end; it's not a partition or a partial sort.
The end is not guaranteed to contain exactly those elements that are to
be removed. On the contrary, it's likely to contain copies of some of
the elements that are being kept, and there may be no instances at all
of those to be removed.
[of std::remove_if]
IIRC, 'remove_if' only places the elements to be removed to the end of
the container.
No, it copies the elements not to be removed to the beginning. Nothing
is said about the end; it's not a partition or a partial sort.
The end is not guaranteed to contain exactly those elements that are to
be removed. On the contrary, it's likely to contain copies of some of
the elements that are being kept, and there may be no instances at all
of those to be removed.