The following C++ code does not compile:
template <typename T>
void f(int, bool = true);
void g()
{
auto h = f<int>;
h(1); // error: too few arguments to function
}
Instead, I have to call h with the 2nd parameter:
h(1, true);
Why doesn't h(1) work?
Is there a simple way to alias a template function to bind the template argument while keeping the default function argument?