Allow code like:
for (int i : std::views::iota(1, 10))
std::cout << i << ' ';
Other versions you can create helpers in a similar way.
This example requires to include a header instead of being an intrinsic property of the for loop. Also is way more verbose than for (int i = 1 : 10) my hope is to make things simpler and easier to read without losing functionality.
You can do this today with a structured binding:
for (auto [b,e,o] = std::tuple(in, in + size, out); b != e; ++b, ++o)
*o = std::tolower(*b);
True, but isn't creating a tuple to just decompose it excessively verbose? Not to mention the need to include a header; also we lose the expressivity of separating each declaration, on my opinion each part separated on different declarations implies intentionality, also more control on the resulting type, i.e:
template <auto size>
void lcase(const char (&in)[size], char (&out)[size])
{
for (const char *b = in; const char *const e = in + size; char *o = out; b != e; ++b, ++o) // Three different explicit types
*o = std::tolower(*b);
}