samedi 10 avril 2021

problem when creating a class with a template

What am I doing wrong?

#include "String.hpp"

namespace java {
      namespace lang {


template<typename  T>
class Comparable<T>  {

protected:
     virtual int8_t compareTo(T& o);
};

}


}



#endif // COMPARABLE_H

I haven't declared this class anywhere before

Comparable.h:11:7: error: explicit specialization of undeclared template class 'Comparable'

Aucun commentaire:

Enregistrer un commentaire