Repository Details
Shared by


HelloGitHub Rating
0 ratings
Claim
Discuss
Collect
Share
12.2k
Stars
Yes
Chinese
C++
Language
No
Active
10
Contributors
60
Issues
No
Organization
2.0.1
Latest
3k
Forks
None
License
More
用 C++11 实现的小型 STL(容器库+算法库)。代码结构清晰规范、包含中文文档与注释,并且自带一个简单的测试框架,适合新手学习与参考。示例代码如下:
```c++
// 在尾部插入元素
template <class T>
void vector<T>::push_back(const value_type& value)
{
if (end_ != cap_)
{
data_allocator::construct(mystl::address_of(*end_), value);
++end_;
}
else
{
reallocate_insert(end_, value);
}
}
```
Included in:
Vol.27
Comments
Rating:
No comments yet