Hello, all.
I saw this in the provided code of a lab that I have due in a couple of
weeks in my algorithms class. It compiled fine in g++ but did not compile
with the VC++ compiler. It does not recognize the angle brackets that
follow "<<" in the operator friend declaration.
--- CODE ---
template <class T> class PriorityQueue {
....
friend std::ostream &operator<< <> (std::ostream &, PriorityQueue &);
}
template <class T>
std::ostream &operator<<(std::ostream &os, PriorityQueue<T> &q)
{
os << "not implemented yet\n";
return os;
}
--- END CODE ---
Is this code standard? If so, how do you suggest I get around the weakness
in the VC++ compiler? If not, how should I write this?
Sincerely,
James