I have a class
class A : public B
{
public:
// 1st copy assignment with parameter pack
template<class Arg>
A& operator=(Arg&& arg)
{
B::operator=(std::forward<Args>(arg));
return *this;
}
// 2nd copy assignment with const A&
A& operator=(const A& arg)
{
// some code
}
};
The 2nd one is not called for the following
A a, b;
a = b;
How to make compiler call the 2nd one for the above code?