If I have a class like this
template <typename T>
class MyClass
{
T myData;
public:
T getValue() { return myData; }
template <typename V>
MyClass(const MyClass<V>& other) :
myData((T) other.getValue())
{
}
};
This would mean that I provide a copy constructor (for V=T) and thus according to this link Why no default move-assignment/move-constructor? I do not get default move constructors etc.
Is there a way to have the templated constructor only work as conversion constructors, so for V!=T?