I could swear that C ++ 11 or 1y introduced a function that allows me to create a range or fragment from a vector. Instead of going around the begin () and end () variable, I just use 1 instead. What is called a class?
Perhaps you are thinking about in a library,Boost::Range and in particular in a classroom iterator_range.
Boost::Range
iterator_range
As far as I can tell, it is not considered ready for standardization until it becomes more real in order to get rid of problems.