August 22, 2022 [Issue 12672] make "ref" a better match than "auto_ref" (especially for variadic arguments) | ||||
|---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=12672 RazvanN <razvan.nitu1305@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |razvan.nitu1305@gmail.com Resolution|--- |WONTFIX --- Comment #1 from RazvanN <razvan.nitu1305@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. -- | ||||
Copyright © 1999-2021 by the D Language Foundation
Permalink
Reply