C++ Templates: implicit conversion, no matching function for call to ctor
- by noname
template<class T>
class test
{
public:
test()
{
}
test(T& e)
{
}
};
int main()
{
test<double> d(4.3);
return 0;
}
Compiled using g++ 4.4.1 with the following errors:
g++ test.cpp -Wall -o test.exe
test.cpp: In function 'int main()':
test.cpp:18: error: no matching…