docs: update containers API docs

This commit is contained in:
2026-03-20 02:35:01 +08:00
parent a647f5e8ec
commit 0c073db4e8
33 changed files with 135 additions and 56 deletions

View File

@@ -14,7 +14,7 @@ Array& operator=(Array&& other) noexcept;
**移动赋值(`=`**
- 先销毁当前所有元素
- 接管 `other` 的所有资源(数据指针、容量)
- 接管 `other` 的所有资源(数据指针、容量、分配器
-`other` 置为空状态
**参数:**
@@ -30,12 +30,12 @@ Array& operator=(Array&& other) noexcept;
**示例:**
```cpp
Containers::Array<int> arr1 = {1, 2, 3};
Containers::Array<int> arr2;
XCEngine::Containers::Array<int> arr1 = {1, 2, 3};
XCEngine::Containers::Array<int> arr2;
arr2 = arr1; // 拷贝赋值arr2 现在是 {1, 2, 3}
Containers::Array<int> arr3 = {4, 5};
XCEngine::Containers::Array<int> arr3 = {4, 5};
arr2 = std::move(arr3); // 移动赋值arr2 现在是 {4, 5}arr3 为空
```