[dmd-beta] D 2.059 beta 4
Walter Bright
walter at digitalmars.com
Mon Apr 9 23:28:27 PDT 2012
On 4/9/2012 10:51 PM, Jonathan M Davis wrote:
> I really don't care how it's implemented for not-templated functions. It can
> be the outright equivalent of C++'s const& for all I care. But without auto
> ref on non-templated functions, we're forced to duplicate any non-templated
> function which takes const ref.
Let's say the compiler auto-generates the following:
void foo(T t) { foo(t); }
in case it sees:
void foo(ref T t) { ... }
I don't think that's a solution at all. It's just a roundabout way for the
compiler to generate a temporary anyway. Nothing has been gained.
More information about the dmd-beta
mailing list