Skip to content

Instantly share code, notes, and snippets.

@hajimehoshi
Created January 8, 2011 17:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hajimehoshi/771022 to your computer and use it in GitHub Desktop.
Save hajimehoshi/771022 to your computer and use it in GitHub Desktop.
#include <algorithm>
#include <iostream>
#include <boost/range.hpp>
template<class Values>
int foo(Values values) {
std::for_each(boost::begin(value), boost::end(values), [](int& value) {
std::cout << value << std::endl;
});
}
int main() {
foo({1, 2, 3, 4, 5});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment