A personally maintained vNext version of the Microsoft STL. Due to Microsoft's business strategy, the STL will not release a vNext version until at least the next major release (VS19). Therefore, it's time for the community to provide a solution to fix some of the bugs in the STL.
- Fix the genuinely broken parts of the STL.
- No new features will be added on top of the STL.
- All changes are header-only, requiring no additional build or deployment steps.
- Strict standard conformance is non-goal. Minor non-conformance issues may remain unfixed to simplify maintenance.
If you find the project useful, be sure to vote for vNext in the Developer Community and don't forget to share it with others.
No dependencies, no need to modify source code. The high-quality implementations provided by this project are more standards-compliant than Microsoft STL and sometimes even outperform libc++ and libstdc++ (which are also ABI-constrained).
For more information, see #3.
- C++20 or later is required for avoid the need for
enable_ifandvoid_tidioms.
This project is always ABI-unstable.
To avoid ODR violations:
- Ensure all files using C++ interfaces include the headers provided by this project.
- Ensure the same version of this project is used.
- Use the same compile options across the entire program whenever possible.
The following is a list of problems that this project will fix:
- ✅
<deque>: Adeque<T>whereTis move-only, when nested in vector, does not compile - ✅
<deque>: Needs a major performance overhaul - ✅ special_math.cpp: Statically linked library contains and depends on Boost symbols
- ❎
<array>:std::array<T,0>calls constructors and destructors ofT - ❎ Reconsider
vector<bool>underlying type - ❎
<functional>: better hash function - ❎ LWG-3120 Unclear behavior of
monotonic_buffer_resource::release() - ❎
<mutex>: changemutexto be an SRWLOCK - ❎
<string>: Consider retuning the Small String Optimization - ❎
<chrono>: Major performance issues when using zoned_time or time_zone
Other bugs may also be considered for fixes if justified, though the listed bugs remain the top priority.
Execute ApplyPatch.ps1 stl-repo-path using PowerShell 7, then build the STL.
RemoveBackup.ps1 is used to delete backups of modifications to the STL, and RevertPatch.ps1 is used to revert all changes made by ApplyPatch.ps1.
- This project will always remain a downstream of the Microsoft STL.
- If Microsoft decides to develop the STL vNext, this project will have fulfilled its mission, and its code may be backported to the Microsoft STL.
This project welcomes contributions from anyone and is licensed under the Apache-2.0 WITH LLVM-exception license, the same as Microsoft STL.
Before contributing, you should have a solid understanding of the C++ standard (for example, by reading the C++ Standard Draft or C++ Reference), and cite relevant sections when necessary.
The build and testing process for this project is identical to Microsoft STL. Before submitting a Pull Request, ensure all tests pass against the Microsoft STL test suite.
All patches need to be applied to the STL by executing ApplyPatch.ps1, and they must be properly backed up as well as reverted via RevertPatch.ps1.
getIdentifiers.js is used to download all identifiers used by the standard library. Open https://eel.is/c++draft, paste content of getIdentifiers.js into the debug console and execute to obtain identifiers.txt. uglify.py is used to uglify the source code, see its output for usage instructions.
This project synchronizes with each Visual Studio update based on the STL Changelog. Prior to each Visual Studio update to the STL, a release of that version of the STL will be published.
Microsoft is a trademark of Microsoft Corporation. The maintainer of this project is not a Microsoft employee, nor is this project sponsored by Microsoft in any way.