Created
October 10, 2017 12:41
-
-
Save deque-blog/b6695b414da3943fb9ecafbe57988be5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
template<typename Iterator, typename Consumer> | |
void for_each(Iterator first, Iterator last, Consumer consumer) | |
{ | |
for (;first != last; ++first) | |
consumer(*first); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment