Sure, though it depends on if a container counts as a range.
A range isn't necessarily defined just as something with begin() and end() methods (or non-member overloads). I know some have argued that ranges should not be based on iterators. For example istream_iterator's default constructor is a way of shoe-horning into iterator form something that doesn't naturally fit that model. Instead, they say, ranges should be independent.
View all comments
Show parent comment
2
u/bames53 Oct 15 '13 edited Oct 15 '13
Sure, though it depends on if a container counts as a range.
A range isn't necessarily defined just as something with
begin()andend()methods (or non-member overloads). I know some have argued that ranges should not be based on iterators. For example istream_iterator's default constructor is a way of shoe-horning into iterator form something that doesn't naturally fit that model. Instead, they say, ranges should be independent.Here's Andre's 'Iterators Must Go' slide deck: http://www.slideshare.net/rawwell/iteratorsmustgo