std::less<void> and pointer types
c++, c++14, language-lawyer
Solution
The current draft from github does not contain any language to that effect; in fact, its definition of `less<>` says explicitly "returns `std::forward<T>(t) < std::forward<U>(u)`", which would be undefined behaviour for incomparable pointers. So... don't do it, I suppose.
If you need a heterogeneous pointer comparator, it's probably best to write your own template predicate which uses `std::less<T*>()` at the appropriate moment.
Problem
`std::less<T *>` is guaranteed to provide total order, regardless of whether both pointers point into the same array. In the latest draft of the standard, is the same true for the transparent function object `std::less<void>` (`std::less<>`) when you call its `operator()`? Obviously, the same question applies to `std::greater`, but I assume they are specified the same.