opStar

Janice Caron caron800 at googlemail.com
Mon Nov 12 04:31:07 PST 2007


On Nov 12, 2007 8:50 AM, Walter Bright <newshound1 at digitalmars.com> wrote:
> 1) copy
> 2) increment
> 3) compare for equality
> 4) get the value

You missed
5) assignment

(And also decrement, but I guess increment and decrement are both just
special cases of adding or subtracting an integer)

You also haven't addressed the point that since no function, opStar
included, can return a reference to a struct, then we are forced to
return a pointer to a struct, so now your iterator behaves not like a
pointer, but a pointer to a pointer.



More information about the Digitalmars-d mailing list