|
Boost : |
From: Darin Adler (darin_at_[hidden])
Date: 1999-11-12 16:34:51
>> Reasons to have operator == be a member:
>
>> - allows inheritance of operator != instead of requiring a second
>> declaration
>
> ???
Dave Abrahams mentioned his operators.h library.
I believe that library provides a class template that implements operator !=
for a subclass based on the operator == in that subclass, using the
"curiously-recurring" template pattern.
This only works for member function versions of operator ==.
But I haven't seen operators.h, I don't think.
-- Darin
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk