MyTinySTL icon indicating copy to clipboard operation
MyTinySTL copied to clipboard

Implement vector constructor to support single-pass input iterator range

Open winner245 opened this issue 4 months ago • 0 comments

目前的 vector 实现并不真正支持只能单次使用的 input_iterator,目前的实现本质上要求输入迭代器必须至少是 forward_iterator。这个问题不仅存在于构造函数,也存在于其他接受迭代器range的成员函数如 insert()/assign(),以及其他容器中。

此 PR 只对 vector ctor 增加了 input_iterator 支持。如果仓库作者愿意接受这个特性支持的话,我很乐意在此方向上继续贡献代码。

winner245 avatar Oct 19 '24 22:10 winner245