
31 Oct
2011
31 Oct
'11
11:12 a.m.
Dave Abrahams wrote:
I think you're missing the point, which is:
When the specification for an algorithm exposes the actual expressions used in a given implementation of an algorithm, it tends to lock down the implementation in ways that don't necessarily make sense (and can prevent optimizations). Tiny details that one usually doesn't consider, like whether part of the expression is an lvalue or an rvalue, const or non-const, become encoded into the specification of the algorithm.
None of this has anything to do with the fact that you want to require operator== to be an equivalence relation, and it doesn't have to be.