Static operator overloads (again)
Giles Bathgate
gilesbathgate at gmail.com
Tue Sep 2 04:34:23 PDT 2008
Jarrett Billingsley Wrote:
> Long story short: I really don't think you can. Operator overloading in D
> can only be performed as nonstatic methods of user-defined types. Since > a virtual method call requires that the object you're calling it on be
> non-null (so that you can get the vtable), you can't use overloaded
> operators on null references.
But static operator overloads are possible in D.
More information about the Digitalmars-d
mailing list