[Issue 12672] make "ref" a better match than "auto_ref" (especially for variadic arguments)

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Aug 22 15:31:08 UTC 2022


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

RazvanN <razvan.nitu1305 at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |razvan.nitu1305 at gmail.com
         Resolution|---                         |WONTFIX

--- Comment #1 from RazvanN <razvan.nitu1305 at gmail.com> ---
Unfortunately, I don't think that this bug report is going to get fixed. Since
both foo() functions are templated, they have to be instantiated before
overload resolution is performed. The auto ref variadic function will
eventually be instantiated as ref or not ref. That's were you get the conflict
from. What is requested here is to modify the overload resolution rules based
on auto refness.

The current overloading rules have been proven to work well and Walter is
always reluctant to modifying them. So, I don't think that this bug report is
ever going to get "fixed". Either way, the proposed workaround is not ugly at
all.

Tentatively, closing as this as WONTFIX.

--


More information about the Digitalmars-d-bugs mailing list