I\'m trying to write a template class which overloads operator==. I know how to get it inside the class:
template
The declaration of the operator==()
is a template. The declaration made a friend
is not a template but a non-template. To make the template operator==()
a friend you need to make the friend declaration a template, too:
template class Point;
template
bool operator== (Point, Point);
template
class Point {
// ...
template
friend bool operator== (Point, Point);
};