971031: template problem

Dirk Herrmann dirk@ida.ing.tu-bs.de
Wed Nov 5 01:53:00 GMT 1997


Hello!

On Tue, 4 Nov 1997, Jay Sachs wrote:
> Modify the friend declartions in set.h to look like:
> 
>   friend bool operator== <>(const set&, const set&);
>   friend bool operator< <>(const set&, const set&);
> 
> Note the '<>' added.  This also should be done in list.h and map.h (at
> least, I haven't checked others).

Thank you for your answer. This fixes the problem, although I still don't
understand why you can just write set&, without any template params. What
does it mean? Is it a shortcut for set<Key, Compare, Alloc>& or does this
line make operator< for _all_ sets, regardless of their actual template
parameters to friends?

Best regards, Dirk Herrmann





More information about the Gcc-bugs mailing list