"the last change" for ranges
Robert Fraser
fraserofthenight at gmail.com
Wed May 20 21:32:20 PDT 2009
Andrei Alexandrescu wrote:
> struct R
> {
> bool empty();
> ref int front();
> void popFront();
> }
>
> ref int popNext(ref R fwdRange)
> {
> auto result = & fwdRange.front();
> fwdRange.popFront;
> return *result;
> }
>
> void main()
> {
> R r;
> int x = r.popNext;
> }
>
> This should work, I just noticed with surprise it doesn't. It's a bug,
> specifically bug 3015:
>
> http://d.puremagic.com/issues/show_bug.cgi?id=3015
Yes. Oh yes. YES!!!
More information about the Digitalmars-d
mailing list