I have the following code in C++:
struct A;
struct B
{
B(){}
template<typename T>
B(T param){}
};
I want the constructor template to be valid only when the typename T
is convertible to the type A
. What is the best way to accomplish this?