Is there a way for compilation to automatically output the template parameter?
template<class T>
struct TestA
{
TestA(T v) {}
};
template<class T>
void TestB(T v)
{
}
int main()
{
TestB (5);
}
Test B works fine, however, when I change it to TestA, it will not compile with the error "using a class template requires a list of template arguments"
user34537
source
share