Template constraints and opAdd
bearophile
bearophileHUGS at lycos.com
Tue Jul 2 01:03:36 PDT 2013
> John:
>
>> Mass!(T,S) opAdd(Mass!(T,S) other) {
>
> If you are using D2 then don't use opAdd, use opBinary:
>
> http://dlang.org/operatoroverloading.html#Binary
Time ago I added an enhancement request for a warning (that later
is meant to become a deprecation) that helps avoid your problem:
http://d.puremagic.com/issues/show_bug.cgi?id=10320
Bye,
bearophile
More information about the Digitalmars-d-learn
mailing list