docs: Fix containers module documentation discrepancies
- Array::SetAllocator: Remove reference to non-existent PoolAllocator class - HashMap::SetAllocator: Remove reference to non-existent GetDefaultAllocator() - HashMap::Copy/Move: Fix move constructor complexity (O(m_bucketCount), not O(1)) - HashMap::iterator: Remove C++20 structured bindings example - String: Add missing links for operator+ and operator==/!=
This commit is contained in:
@@ -27,16 +27,6 @@ for (auto it = map.begin(); it != map.end(); ++it) {
|
||||
std::cout << it->first << " -> " << it->second << std::endl;
|
||||
}
|
||||
// 输出顺序不确定,取决于哈希桶的内部布局
|
||||
|
||||
// 范围 for 循环(需要 C++20 或手动实现 begin/end)
|
||||
for (auto& [key, value] : map) {
|
||||
std::cout << key << " -> " << value << std::endl;
|
||||
}
|
||||
|
||||
// 常量迭代器
|
||||
for (auto it = map.begin(); it != map.end(); ++it) {
|
||||
std::cout << it->first << " -> " << it->second << std::endl;
|
||||
}
|
||||
```
|
||||
|
||||
## 相关文档
|
||||
|
||||
Reference in New Issue
Block a user