int main() { Superclass osuper; Subclass osub; Superclass* p = &osub; *p = osuper; osub.Announce(); return 0; }
friend bool operator>=(Subclass const& lhs, T const& rhs) { return lhs.compare(rhs) >= 0; }
friend bool operator!=(T const& lhs, Subclass const& rhs) { return rhs.compare(lhs) != 0; }
friend bool operator<=(Subclass const& lhs, Subclass const& rhs) { return lhs.compare(rhs) <= 0; }
friend bool operator>=(const Subclass& lhs, const T& rhs) { return lhs.compare(rhs) >= 0; }
friend bool operator!=(const T& lhs, const Subclass& rhs) { return rhs.compare(lhs) != 0; }
friend bool operator<=(const Subclass& lhs, const Subclass& rhs) { return lhs.compare(rhs) <= 0; }