What is a non-deduced context?
I’ve stumbled over Why is the template argument deduction not working here? recently and the answers can be summed up to “It’s a non-deduced context”.
Deducing template parameter
I have a class Tester
which is inherited from class Usual
or Special
. It depends on a template parameter useSpecial
. By default, it uses Usual
, but if the user wants, he can use Special
instead.
Extracting function parameter types from templated function
Suppose I have a template that expect a function pointer: