jeudi 19 mars 2020

Can't overload == for template in class

This code:

template <typename T>
class A {
    operator ==(const T &a, const T &b);
}

cause error:

bool Tree<T>::operator==(const T&, const T&)’ must take exactly one argument

Aucun commentaire:

Enregistrer un commentaire