1) This result is not specified.
2) This result is unspecified. *
3) Yes.
The relevant section in the standard is §5.9 / 2. Relational comparisons between pointers pand are qindicated only when:
pand qpoint to the same object or function, point to one end of the end of the same array, or both values are zero. In this case, p <= qthey p >= qare both true p < qand p > qfalse.p q , . ( : .)p q , .p q , .
.
* , () " ". , , , . (.)
>
! , std::less<void*> ( .)
§20.3.3/8:
greater, less, greater_equal less_equal , <, >, <=, >= .
, , std::less<void*>(&gFirst, &gSecond) true false, :
std::less<void*>(&gFirst, &gSecond) ==
std::greater<void*>(&gSecond, &gFirst);
std::less<void*>(&Data::First, &Data::Second) ==
std::greater<void*>(&Data::Second, &Data::First);
.