Skip to content

Instantly share code, notes, and snippets.

@trikitrok
Created March 2, 2014 11:37
Show Gist options
  • Save trikitrok/596fc1caf058a679115e to your computer and use it in GitHub Desktop.
Save trikitrok/596fc1caf058a679115e to your computer and use it in GitHub Desktop.
std::vector<int> NumbersFilter::ignoreTooBig(const std::vector<int> & numbers) const {
std::vector<int> filteredNumbers;
std::copy_if(numbers.begin(), numbers.end(),
std::back_inserter(filteredNumbers),
[](const int number) { return !(number > 1000); });
return filteredNumbers;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment