MyTinySTL README

The project's README from github.com/Alinshans/MyTinySTL. As one markdown file: README.md.

MyTinySTL

Build Status Build Status Release License Chat

简介

基于 C++11 的 tinySTL,这是我的第一个项目,使用了中文文档与中文注释,有不规范或不当的地方还请海涵。刚开始是作为新手练习用途,直到现在已经发布了 2.x.x 版本。实现了大部分 STL 中的容器与函数,但仍存在许多不足与 bug 。从 2.x.x 版本开始,本项目会进入长期维护的阶段,即基本不会增加新的内容,只修复发现的 bug。如发现错误,还请在 Issues 中指出,欢迎 Fork 和 Pull requests 改善代码,谢谢!

支持

需要

运行

如果你想要运行测试,请先阅读 这个 。

  1. 克隆仓库
$ git clone [email protected]:Alinshans/MyTinySTL.git
$ cd MyTinySTL
  1. 构建并运行
$ mkdir build && cd build
$ cmake ..
$ make
$ cd ../bin && ./stltest
  1. 克隆仓库或 Download ZIP
  2. 使用 vs2015(或 vs2017)打开 MSVC/MyTinySTL_VS2015.sln,配置成 Release 模式,(Ctrl + F5)开始执行。

文档

见 Wiki。

测试

见 Test。


Introduction

This is a tinySTL based on C++11, which is my first project for practice. I use the Chinese documents and annotations for convenience, maybe there will be an English version later, but now I have no time to do that yet. Now I have released version 2.0.0. I have achieved the vast majority of the containers and functions of STL, and there may be some deficiencies and bugs. From the version 2.x.x, the project will enter the stage of long-term maintenance, i.e., I probably will not add new content but only fix bugs found. If you find any bugs, please point out that in Issues, or make a Pull requests to improve it, thanks!

Supported

Required

Run test

If you want to run the test, please read this first.

  1. git clone
$ git clone [email protected]:Alinshans/MyTinySTL.git
$ cd MyTinySTL
  1. build and run
$ mkdir build && cd build
$ cmake ..
$ make
$ cd ../bin && ./stltest
  1. git clone or Download ZIP
  2. use vs2015(or vs2017) open the file MSVC/MyTinySTL_VS2015.sln, configured in Release, run this project(Ctrl + F5).

Documents

See Wiki.

Test

See Test.

MyTinySTL (Alinshans/MyTinySTL)

stl
Searching Database…

12.5K ·GitHub
What is this?A tiny reimplementation of the C++ Standard Template Library written from scratch in C++11 — most standard containers and algorithms, started as the author's first practice project and now at version 2.x.x.
Is this a library I can build and link into my own code, or just source to read?A C++ library you build from the repository — cmake is optional and there is no package-manager install. Since it began as a learning exercise, treat it as educational code rather than a production-ready dependency.
How do I build and run it?On Linux/macOS clone the repo and build (cmake optional); on Windows open MSVC/MyTinySTLVS2015.sln in Visual Studio 2015/2017, set Release, and run with Ctrl+F5. Test instructions live in the Test directory.
Which compilers does it need?g++ 5.4+, clang++ 3.5+, or MSVC 14.0+ (Visual Studio 2015 or newer). cmake 2.8 can be used for building but is optional.
Is it as complete and reliable as the standard library?No — it covers the vast majority of STL containers and functions, but the author notes there may still be deficiencies and bugs, so it is not a battle-tested replacement for std.
Is this a good way to learn how the STL works internally?Yes — it was written as a beginner's practice project, so the code is meant to be read and studied as much as used.
Can I build it on Windows too, or is it Linux-only?It officially supports Linux, Windows, and macOS, with separate build paths for gcc/clang and MSVC.
Is the project still actively developed?Since version 2.x.x it is in long-term maintenance mode: no new features are planned, only fixes for bugs found, which users are asked to report in Issues.
Do I need to read Chinese to get the most out of it?The documentation, Wiki, and code comments are in Chinese; the README has an English section, and the author says an English version may come later. For the deeper material, some Chinese helps.
Creator
Alinshans
Size
2.6 MB
Stars
12.5K
Age
10y
Commits · 90 Days