Const lazy arguments?

bearophile bearophileHUGS at lycos.com
Wed Jan 11 06:34:40 PST 2012


Ben Davis:

> If you had a "const lazy SomeClass con" and a "lazy SomeClass mut", you 
> could write "mut.x=y" but not "con.x=y". I think.

You are right, this code compiles:


struct Foo {
    int i;
}
void foo(lazy Foo f) {
    f.i++;
}
void main() {}


Thank you,
bearophile


More information about the Digitalmars-d-learn mailing list