|
|
|
|
|
by Olipro
2006 days ago
|
|
An iterator is a class. It can contain any private data you desire and mutate in any wonderful and/or stupid ways you desire. How it decides to compare equal to the .end() instance is also your call. Your example is not a compliant iterator (as in, wouldn't work in a range-based for loop) - yet the same behaviour would be achievable through your own operator++() and operator bool(), |
|