this as lvalue?

bearophile bearophileHUGS at lycos.com
Fri Sep 3 14:03:21 PDT 2010


JMRyan:
> Is this a bug in the compiler (v.2.047)?  Am I missing something in 
> thinking it shouldn't be?

I think it's not a bug. It's not a common need, but a method may way want to swap this with another. In Phobos this is done on a struct, see:
http://www.dsource.org/projects/phobos/browser/trunk/phobos/std/stdio.d#L324

Bye,
bearophile


More information about the Digitalmars-d mailing list