在接下来的内容中:
在这种情况下,当我调用函数时,编译器如何获取正确的运算符?
template<typename Derived>
class Base:
{
inline Derived& operator=(const Base<Derived>& x);
}
这个声明是否会删除默认的复制赋值操作符,还是说我将拥有两个操作符:
inline Derived& operator=(const Base<Derived>& x);
// (declared by me)
AND
inline Base<Derived>& operator=(const Base<Derived>& x);
// (declared by the compiler)
在这种情况下,当我调用函数时,编译器如何获取正确的运算符?