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)

Searching Database…

12.5K ·GitHub
这是什么东西?一个用 C++11 从零手写的小型 C++ 标准模板库(STL)复刻版——覆盖了大部分标准容器和算法,最初是作者的第一个练手项目,现在已到 2.x.x 版本。
这是一个能构建并链接进我自己代码的库,还是只是用来阅读的源码?它是一个需要从仓库自行构建的 C++ 库——cmake 是可选的,也没有包管理器安装方式。因为它最初只是个学习练习,更适合当作教学代码来用,而不是生产环境的依赖。
怎么构建和运行?在 Linux/macOS 上克隆仓库后构建(cmake 可选);在 Windows 上用 Visual Studio 2015/2017 打开 MSVC/MyTinySTLVS2015.sln,选 Release,按 Ctrl+F5 运行。测试说明在 Test 目录里。
需要什么编译器?g++ 5.4+、clang++ 3.5+,或 MSVC 14.0+(Visual Studio 2015 或更新版本)。可以用 cmake 2.8 来构建,但不是必须的。
它和标准库一样完整可靠吗?不——它覆盖了绝大多数 STL 容器和函数,但作者指出可能仍存在不足和 bug,所以它不是经过大量实战检验的 std 替代品。
用它能学好 STL 的内部原理吗?可以——它本来就是作为初学者的练手项目写的,代码既供使用,也供阅读和学习。
在 Windows 上也能构建吗,还是只支持 Linux?官方支持 Linux、Windows 和 macOS,gcc/clang 和 MSVC 各有单独的构建方式。
这个项目还在活跃开发吗?从 2.x.x 版本起,项目进入了长期维护模式:不再计划新增功能,只修复发现的 bug,作者请大家把 bug 提交到 Issues 里。
想充分利用它,我得会中文吗?文档、Wiki 和代码注释都是中文的;README 里有英文部分,作者说以后可能会出英文版本。想深入看内容的话,懂一些中文会有帮助。
Creator
Alinshans
Size
2.6 MB
Stars
12.5K
Age
10y
Commits · 90 Days