---
title: operator=
description: "重载运算符函数，将初始化列表中的元素赋值给一个SVector对象。"
url: https://www.hiascend.com/document/detail/zh/canncommercial/latest/API/ascendtb/ascendtb_01_0101.html
sourcePath: /source/zh/canncommercial/900/API/ascendtb/ascendtb_01_0101.html
indexId: c2249296d1f2ba2ab68eacbcfb385a27e910d75ab37fba41c4b522564469d7d764
---
# operator=

#### 功能说明

重载运算符函数，将初始化列表中的元素赋值给一个SVector对象。


#### 定义

```
SVector &operator=(std::initializer_list<T> list)
SVector& &operator=(const SVector &other)
```


#### 参数列表

| 参数名 | 输入/输出 | 说明 |
| --- | --- | --- |
| list | 输入 | 将初始化列表中的元素赋值给一个SVector。 |
| other | 输入 | 用一个容器给另一个容器赋值。 |


#### 返回值说明

| 类型 | 输入/输出 | 说明 |
| --- | --- | --- |
| SVector& | 输出 | 返回容器引用。 |
