对于AscendString对象大小比较的使用场景(例如map数据结构的key进行排序),通过重载以下关系符实现。
1 2 3 4 5 6 7 8 | bool operator<(const AscendString& d) const;
bool operator>(const AscendString& d) const;
bool operator<=(const AscendString& d) const;
bool operator>=(const AscendString& d) const;
bool operator==(const AscendString& d) const;
bool operator!=(const AscendString& d) const;
bool operator==(const char_t *const d) const;
bool operator!=(const char_t *const d) const;
|