
13 Apr
2011
13 Apr
'11
10:33 p.m.
At Wed, 13 Apr 2011 21:44:04 +0200, Anders Dalvander wrote:
On 2011-04-13 20:22, Dave Abrahams wrote:
If you test it with std::less you can get false positives.
Please forgive me for continuing further down this road and for being OT.
But I don't understand how the std::less approach would give false positives. Care to explain, or direct me to a better location for getting the answer?
std::less<T*> could produce a total ordering such that std::less<T*>()(x,y) && std::less<T*>()(y,z) when [x,z) denotes an allocated memory block and y denotes an address outside that block. The ordering produced by comparing addresses with their bits permuted in a given way is an example. -- Dave Abrahams BoostPro Computing http://www.boostpro.com