fun
is a function template. Its template parameter L
doesn't appear anywhere in the function signature, and so cannot be deduced from the arguments. The only way to call fun
is to provide the template argument explicitly, as in p.fun<SomeType>(cd)
Now, it's unclear why fun
is made template, seeing as it doesn't use L
at all.