Re: [boost] Please don't define a fake "operator <" just for ordered containers

A quick follow up after discussing this some with Alex, he agrees with my points but also noticed a discrepancy. Item 5 is striving to establish the relationship between the algebraic operators and operator <. We would also like the following to hold: a < b => a + c < b + c A lexicographical compare for std::complex would violate this. So I need to refine item 5 to specify the algebraic relations that should hold and std::complex is no longer a counter example to 4. But std::less<> should be defined for complex under the rules of 4a. Sean

Sean Parent wrote:
A quick follow up after discussing this some with Alex, he agrees with my points but also noticed a discrepancy.
Item 5 is striving to establish the relationship between the algebraic operators and operator <. We would also like the following to hold:
a < b => a + c < b + c
A lexicographical compare for std::complex would violate this.
Would it?
participants (2)
-
Peter Dimov
-
Sean Parent