
Jody Hagins wrote:
On Mon, 10 Jul 2006 23:52:45 +0300 "Peter Dimov" <pdimov@mmltd.net> wrote:
Daryle Walker wrote:
Looking at <http://www.boost.org/libs/smart_ptr/shared_ptr.htm>, i.e. the Boost version, it seems that the authors fell into the "fake operator <" trap. If any of those authors are reading this, can you tell us why you added the fake operator instead of a custom-named comparison class?
shared_ptr defines operator< for map<shared_ptr<>, V> to work. What do you mean by "fake"?
I think that's what he means by "fake." You defined an operator<() so that it could be used with an STL container using the "default" comparator, while providing a shared-ptr-less-than-by-comparing-the-pointer comparator would be more appropriate.
I know what I did, but this still doesn't tell me what "fake" means in this context. What objective properties make an operator< "fake"?