Instantly share code, notes, and snippets.

Embed
What would you like to do?
std::iota(xs.begin(), xs.end(), iota_step<int>(2, 2)); //xs = 2 4 6 8 10 12 14 16 18 20
std::iota(xs.begin(), xs.end(), iota_step<int>(0, -2)); //xs = 0 -2 -4 -6 -8 -10 -12 -14 -16 -18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment