Skip to content

Instantly share code, notes, and snippets.

@trikitrok
Last active June 30, 2024 14:22
Show Gist options
  • Save trikitrok/b348dc4d93782faa82c7 to your computer and use it in GitHub Desktop.
Save trikitrok/b348dc4d93782faa82c7 to your computer and use it in GitHub Desktop.
bool notTooBig(int number);
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),
notTooBig);
return filteredNumbers;
}
bool notTooBig(int number) {
return !(number > 1000);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment