Iterators for D
Tom S
h3r3tic at remove.mat.uni.torun.pl
Tue Nov 7 06:32:53 PST 2006
Craig Black wrote:
> When writing custom C++ iterators, I find that end() is not ever necessary.
> If end() is not used, it means that a little more smarts have to be added to
> the iterator itself so that the iterator knows when to stop. In some cases
> this means that the iterator needs a pointer to the collection/container
> object in order to get that information.
Also in some cases, 'end()' is really unnatural to write. E.g. with
cyclic containers.
More information about the Digitalmars-d
mailing list