R-values and const ref

dsimcha dsimcha at yahoo.com
Thu Sep 9 06:06:29 PDT 2010


== Quote from dsimcha (dsimcha at yahoo.com)'s article
> FWIW, if you can't use templates and auto ref, there is a (slightly verbose)
> solution.  DMD apparently allows overloading ref vs. non-ref, so you can write a
> forwarding function to bind to rvalues.

...except that I just realized it's broken for structs.
http://d.puremagic.com/issues/post_bug.cgi


More information about the Digitalmars-d mailing list