---
title: 关系符重载
description: "| 产品 | 是否支持 |"
url: https://www.hiascend.com/document/detail/zh/canncommercial/latest/others/dataflowdevg/udfrefc_23_00020.html
sourcePath: /source/zh/canncommercial/900/others/dataflowdevg/udfrefc_23_00020.html
indexId: 10a62a64f59b155c7e495da75787f02778ed99d03a62527d0d4f9103176e2a7d71
---
# 关系符重载

#### 产品支持情况

| 产品 | 是否支持 |
| --- | --- |
| Atlas A3 训练系列产品 / Atlas A3 推理系列产品 | √ |
| Atlas A2 训练系列产品 / Atlas A2 推理系列产品 | √ |
| Atlas 200I/500 A2 推理产品 | x |
| Atlas 推理系列产品 | x |
| Atlas 训练系列产品 | x |


#### 函数功能

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


#### 函数原型

```
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
```


#### 参数说明

无。


#### 返回值

无。


#### 异常处理

无。


#### 约束说明

无。
