Nevin Liber <nevin@eviloverlord.com> writes:I cannot control your email software, but when you sent me the message,
| [Y'know, I really wish replies would by default go the whole ub group...]
it wasn't addressed to the group and I replied the same way.
As observed by Sean Parent in another discussion, std::less<T*> as a
total order was never meant to be synonymous for operator< on pointers.
| If someone writes:in my book, that someone writing this isn't a novice, but we have
|
| struct Foo
| {
| X x;
| Y y;
| Z z;
|
| friend bool operator<(Foo const& l, Foo const& r)
| { return std::tie(l.x, l.y, l.z) < std::tie(r.x, r.y, r.z); }
already disagreed on this.
If X, Y, and Z are pointers, I don't think he or she would have written that.
| };
|
| If X, Y or Z are pointers, this code is broken!