From: "Walter Bright" <[email protected]>

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) { ... }


No, not when it sees:

    void foo(ref T t) { ... }

It's when it sees:

    void foo(auto ref T t) { ... }

_______________________________________________
dmd-beta mailing list
[email protected]
http://lists.puremagic.com/mailman/listinfo/dmd-beta

Reply via email to