Quick A: Not in the standard, but in other libraries yes.
Recently on SO:
Is there a range class in C++11 for use with range based for loops?
The C++ standard library does not have one, but Boost.Range has boost::counting_range, which certainly qualifies. You could also use boost::irange, which is a bit more focused in scope.
Add a Comment
Comments are closed.