Skip to content

Instantly share code, notes, and snippets.

@Risca

Risca/C++ magix

Created May 27, 2015
Embed
What would you like to do?
#include <vector>
#include <boost/range/algorithm_ext/iota.hpp>
#include <boost/range/algorithm/copy.hpp>
#include <boost/range/adaptor/transformed.hpp>
#include <boost/lambda/lambda.hpp>
using namespace boost::adaptors;
using namespace boost::lambda;
int main()
{
std::vector<int> numbers(10);
boost::copy(boost::iota(numbers, 1) | transformed(_1 * 100),
std::ostream_iterator<int>(std::cout,", "));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.