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

@@ -8,7 +8,8 @@ void PushBack(T&& value);
在数组末尾添加一个元素。
**拷贝版本(`const T&`**
- 如果容量不足(`Size() >= Capacity()`),先扩容(容量翻倍)
- 如果容量不足(`m_size >= m_capacity`),先扩容
- 当容量为0时首次扩容至4之后每次扩容翻倍即 4 → 8 → 16 → ...
- 在末尾位置拷贝构造 `value`
**移动版本(`T&&`**
@@ -25,7 +26,7 @@ void PushBack(T&& value);
**示例:**
```cpp
Containers::Array<std::string> arr;
XCEngine::Containers::Array<std::string> arr;
// 拷贝添加
std::string s = "hello";