12 typename TOther =
const TDerived &>
24 decltype(&TDerived::Equals)>::value,
25 "Derived class must implement Equals method.");
27 return static_cast<const TDerived *
>(
this)->
Equals(other);
52 typename TOther =
const TDerived &>
65 decltype(&TDerived::CompareTo)>::value,
66 "Derived class must implement CompareTo method.");
68 return static_cast<const TDerived *
>(
this)->
CompareTo(other);
全序比较接口
Definition IComparable.h:54
bool Equals(TOther other) const
判断当前对象与另一个对象是否相等
Definition IComparable.h:74
bool operator<=(TOther other) const
判断当前对象是否小于或等于另一个对象
Definition IComparable.h:90
int CompareTo(TOther other) const
比较当前对象与另一个对象的大小关系
Definition IComparable.h:60
bool operator<(TOther other) const
判断当前对象是否小于另一个对象
Definition IComparable.h:82
bool operator>(TOther other) const
判断当前对象是否大于另一个对象
Definition IComparable.h:98
bool operator>=(TOther other) const
判断当前对象是否大于或等于另一个对象
Definition IComparable.h:106
相等性比较接口
Definition IComparable.h:14
bool operator==(TOther other) const
判断当前对象是否与另一个对象相等
Definition IComparable.h:33
bool operator!=(TOther other) const
判断当前对象是否与另一个对象不相等
Definition IComparable.h:41
bool Equals(TOther other) const
判断当前对象与另一个对象是否相等
Definition IComparable.h:19