[Issue 17734] __traits(isRef) cannot currently be used to distinguish l-value from r-value passing of `this`

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Tue Aug 8 13:42:30 PDT 2017


https://issues.dlang.org/show_bug.cgi?id=17734

--- Comment #6 from Andrei Alexandrescu <andrei at erdani.com> ---
(In reply to Per Nordlöw from comment #5)
> (In reply to Andrei Alexandrescu from comment #4)
> > Don't use methods. Instead, use regular functions with UFCS and overload on
> > ref and non-ref to distinguish rvalues from rvalues.
> 
> But the whole issue is about operator overloading, and those (sadly) must be
> members (currently). Are there any plans of changing this?

That would be a better angle for an enhancement request.

--


More information about the Digitalmars-d-bugs mailing list