opCast using in template struct

bearophile bearophileHUGS at lycos.com
Thu Oct 18 14:45:03 PDT 2012


Era Scarecrow:

> It's an easy mistake to make. Maybe the compiler should issue a 
> warning when opAssign attempts and fails and opOpBinary is 
> defined.

If you have strong feelings about this, then add a Bugzilla entry.

There are other cases. Generally the D compiler should add some 
warnings that help against operator overloading mistakes.

Bye,
bearophile


More information about the Digitalmars-d-learn mailing list