Change it like this:
{ if(this != &in) this->set(in); return (*this); }
I suspect that the set function is defined in the base class? Unqualified names are not displayed in the base class, which depends on the template parameter. Therefore, in this case, the name set is probably associated with the std::set template, which requires template arguments.
If you qualify the name with this-> , the compiler is explicitly invited to look into the scope of the class and includes dependent base classes in this search.
source share