2013/11/20 Jakob Ovrum <[email protected]>

>
>  I was not sure that the fun!int is legitimate usage.
>>
>
> I also ask this question. I think it may prove useful, and code in the
> wild might be relying on it.


One of the known issue is, that the specified type parameters may not match
exactly to the function parameters position.

You can make a partially specialized lambda like follows.

X!((int a, b) => a + b)

Then, inside X(alias fun), fun!long means instantiate (int a, long b){
return a + b; }.
And of course, fun!(int, int) will be invalid.

So, specifying type parameter for the template lambda will make the
template code unreliable.

I think it is not good feature in general.

Kenji Hara

Reply via email to