Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

COMP: Fix compile warning C4858: discarding return value in std::remove #1660

Merged
merged 2 commits into from
Jan 18, 2024

Conversation

dzenanz
Copy link
Contributor

@dzenanz dzenanz commented Jan 18, 2024

Closes #1652.

C:\Dev\ANTs\Examples\sccan.cxx(2593,8): warning C4858: discarding return value: The 'remove' and 'remove_if' algorithms return the iterator past the last element that should be kept. You need to call container.erase(result, container.end()) afterwards. In C++20, 'std::erase' and 'std::erase_if' are simpler replacements for these two steps.
@cookpa cookpa merged commit dcdc878 into ANTsX:master Jan 18, 2024
1 check passed
@dzenanz dzenanz deleted the compFix branch January 18, 2024 14:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Warnings possibly indicating problems
2 participants