P
Preben
I've encountered a little problem:
when defining these operators
----------
friend bool operator!= <>(const A& p, const V& q) {
return !(p==q);
}
friend bool operator< <>(const A& p, const B& q);
----------
I get an error on the first declaration:
defining explicit specialization 'operator!=<>' in friend declaration
The second declaration works fine
However, when removing the "<>", a warning for the second friend
operator definition appear.
----------
friend bool operator!= (const A& p, const V& q) {
return !(p==q);
}
friend bool operator< (const A& p, const B& q);
----------
and the warning is
friend declaration bool operator< (const A&, const B&) declares a
non-template function
What is the exact difference, and how do I determine the correct use of
"<>" in the second case?
Best regards
Preben
when defining these operators
----------
friend bool operator!= <>(const A& p, const V& q) {
return !(p==q);
}
friend bool operator< <>(const A& p, const B& q);
----------
I get an error on the first declaration:
defining explicit specialization 'operator!=<>' in friend declaration
The second declaration works fine
However, when removing the "<>", a warning for the second friend
operator definition appear.
----------
friend bool operator!= (const A& p, const V& q) {
return !(p==q);
}
friend bool operator< (const A& p, const B& q);
----------
and the warning is
friend declaration bool operator< (const A&, const B&) declares a
non-template function
What is the exact difference, and how do I determine the correct use of
"<>" in the second case?
Best regards
Preben