I'm in the process of creating a double-linked list, and have overloaded the operator= to make on list equal another:
template<class T>
void operator=(const list<T>& lst)
{
clear();
copy(lst);
return;
}
but I get this error when I try to compile:
container_def.h(74) : error C2801: 'operator =' must be a non-static member
Also, if it helps, line 74 is the last line of the definition, with the "}".
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…