下载
中文
注册

关系符重载

对于AscendString对象大小比较的使用场景(例如map数据结构的key进行排序),通过重载以下关系符实现。

1
2
3
4
5
6
  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;