13 Apr
2016
13 Apr
'16
8:01 a.m.
On 12-04-16 12:33, work wrote:
... and for the primitive snipped used std::less<> does not seem essential (we do not seem to care for actual order).
Relative pointer comparison is unspecified unless the pointers point to different members of same object/array (or if they point to functions). It's also unspecified if only one of the pointers is null. ( § 5.9 ad 2.) std::less<> specifies an exception in § 20.8.5/8: "For templates greater, less, greater_equal, and less_equal, the specializations for any pointer type yield a total order, even if the built-in operators <, >, <=, >=do not." It's an interesting world :)