No Access to lvalue in static operator overloads.
Derek Parnell
derek at psych.ward
Tue Jul 3 14:28:36 PDT 2007
On Tue, 03 Jul 2007 15:24:06 -0400, Giles Bathgate wrote:
> What I prepose is that if the programmer specifies the following code:
>
> public class Test
> {
> public static Test opAddAssign(Test lvalue, Test rvalue)
> {
> //...
> }
>
> }
>
> When the user writes:
>
> Test a;
> Test b;
>
> a += b;
>
> Should compile into:
>
> Test.opCatAssign(a,b);
(maybe Test.oAddAssign(a,b); ?)
But I like the idea very much. It would solve, in a simple manner, some
issues I have.
--
Derek Parnell
Melbourne, Australia
skype: derek.j.parnell
More information about the Digitalmars-d
mailing list