
25 Jul
2009
25 Jul
'09
9:51 p.m.
Steven Watanabe wrote:
Can't you handle that by storing a range that always contains only one element: [iterator,iterator+1)?
How would you implement popFront() without storing two iterators, an iterator and a bool, or something?
I guess an iterator you can set to some special value might do the trick. For example, that special value may be an iterator to a static instance of a dummy element, or in the case of pointers 0.