I have a class template with a conversion constructor to the template type. And a function that takes two parameters of that class template. I referred to this question/answer to allow the function to make use of the conversion constructor, however the answer states that you can only call the function if at least one of the arguments is explicitly constructed. Is there any other way to allow the function to be called with all the arguments implicitly constructed?
so this is what I have after referring to the mentioned link. This works if at least argument lhs or rhs are explicitly of type X, and I want it to work even if both are of type T.
template<typename T>
class X {
public:
X(T t) {}
friend void func(X lhs, X rhs) {}
};