Template type deduction question

data pulverizer data.pulverizer at gmail.com
Thu May 21 04:46:02 UTC 2020


I'd like to pass kernel functions using:

```
auto calculateKernelMatrix(K, T)(K!(T) Kernel, Matrix!(T) data)
{
   ...
}

```

and call it using `calculateKernelMatrix(myKernel, myData);` but 
I get a type deduction error and have to call it using 
`calculateKernelMatrix!(typeof(myKernel), float)(myKernel, 
myData);`

How do I resolve this?


More information about the Digitalmars-d-learn mailing list