function type parameter inference not working

Ali Çehreli via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Apr 25 13:32:40 PDT 2017


On 04/25/2017 01:02 PM, XavierAP wrote:

 > It would be helpful if the error message talked about the ref qualifier
 > as the root cause instead of the consequent failure to infer template
 > parameters.

That's a common request but the solution is not implemented yet because 
it's not trivial if you consider multiple overloads.

The compiler must remember which parameters failed and present it in a 
readable format: "I considered these overloads and this failed for 
parameter 1 and this other one failed for parameter 2 (although it might 
succeed if it were not ref), etc."

Ali



More information about the Digitalmars-d-learn mailing list