opAssign and references

Trass3r un at known.com
Tue Jan 31 14:43:54 PST 2012


> I am using DMD 2.057 on Ubuntu 64bit. Are you sure that it does not  
> work? Can anyone reproduce the error?
>
> import std.variant;
> struct Foo {
>      Variant a;
>      ref Variant refA(){
>          return a;
>      }
> }
> void main(){
>      Foo f1;
>      f1.refA() = 24;
> }

Compiles fine on Ubuntu x64 with git dmd and -m(32|64)


More information about the Digitalmars-d-learn mailing list