|
Boost : |
From: Darin Adler (darin_at_[hidden])
Date: 1999-11-13 13:35:04
Valentin:
> We are not talking about the same things; I am talking about (roughly):
>
> template <class T>
> struct equalty_comparable
> {
> friend bool operator!= (T, T);
> };
Oh! Great! It seems that would work fine.
It seems a little strange to use "friend" in this way, since operator !=
doesn't need any special access to the class equality_comparable, but I
guess it's the only way. Seems a bit sneaky.
I didn't catch that when looking at the header that Beman posted. I guess I
don't understand the original remark Dave Abrahams made a while back.
Dave Abrahams:
> I would prefer for it to be a member, so that we could take advantage of my
> operators.h library ;)
This is what made me assume that operators.h required and used only member
functions for the operator implementations.
-- Darin
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk