Re: Cannot deduce function from argument type when single candidate

2021-03-28 Thread Preetpal via Digitalmars-d-learn
On Monday, 29 March 2021 at 01:39:16 UTC, Adam D. Ruppe wrote: On Monday, 29 March 2021 at 01:24:13 UTC, Preetpal wrote: writeln(isRandomAccessRange(arr)); Template arguments are passed by !(), not just (). I believe you must also pass `typeof(arr)` since isRandomAccessRange is only

Re: Cannot deduce function from argument type when single candidate

2021-03-28 Thread Adam D. Ruppe via Digitalmars-d-learn
On Monday, 29 March 2021 at 01:24:13 UTC, Preetpal wrote: writeln(isRandomAccessRange(arr)); Template arguments are passed by !(), not just (). I believe you must also pass `typeof(arr)` since isRandomAccessRange is only interested in types.

Cannot deduce function from argument type when single candidate

2021-03-28 Thread Preetpal via Digitalmars-d-learn
This is a minimal example that re-creates the error message. I am not understanding the error message that the compiler is giving me. From my understanding, the compiler is saying that there is a single possible candidate but it cannot figure out which one to choose. Why would it not choose