
On Jan 28, 2013, at 5:12 PM, Joel de Guzman <djowel@gmail.com> wrote:
On 1/29/13 5:58 AM, Gottlob Frege wrote:
How do I know if is it singular valued?
How do you know if an iterator is singular valued? You can't. Same here.
it == container.end()?
Or am I confused?
Nope. A singular valued iterator may not be compared. A singular valued iterator is not associated with any sequence. E.g default constructed iterator pointing to nowhere.
Singular iterators are default constructed instances that represent a universal end iterator. They are not associated with any particular container, but would be returned by end(), and can be obtained by advancing a non-end iterator far enough. Thus, Tony's snippet is a means to discover a singular instance, as would comparing with a default constructed iterator. Is the same now to be possible with recursive_wrapper? ___ Rob