On Saturday, 17 January 2015 at 21:21:05 UTC, Walter Bright wrote:
On 1/17/2015 4:40 AM, Manu via Digitalmars-d wrote:
So when handling ref-related edge cases, do we now have to
handle 3
cases? not-ref, ref, and return-ref right?
How do I know if some argument is return-ref? I guess we'll
need
another annoying __traits or something so I can pipe that
information
into my mixins that deal with ref mess...
Or have your mixins generate templates, which will infer
'return'.
On that ref issue, I just have to duplicate a bunch of code so it
can work for classes and struct alike. There is no way to make
something conditionally ref.