HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
microsoft
STL
C++2019–2026
microsoft / STL

STL

MSVC's implementation of the C++ Standard Library.

30Distinct people
49Mentions
0Explicit recommenders
11.2KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

MSVC's implementation of the C++ Standard Library.

GitHub

Where it is used

No documented product use was verified in the last source check.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

Mentioned in the same Hacker News threads. That is not proof they are substitutes.

This week on Hacker News

Nov 8–Nov 15 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/15/2026, 12:45:45 PM UTC.

Why Zig over C for Systems Programming direct repository linkDebated

Participants debate whether Zig offers distinct advantages over C or if its benefits can be replicated through modern C tooling and discipline. Strong disagreement exists regarding the suitability of Zig for production systems due to its pre-1.0 status, limited developer resources, and recent critical bugs in library rewrites.

108 readable replies · Supporting reply 1 · Supporting reply 2 · Supporting reply 3 · Supporting reply 4

Mentions over time

HN mentions by year49 dated mentions

Observed mentions: 2019-09-17 00:58:44 UTC to 2026-07-26 15:13:46 UTC.

02468102019-01-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 4 mentions; 2 submissions, 2 comments20192020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 5 mentions; 1 submissions, 4 comments2021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 8 mentions; 0 submissions, 8 comments2022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 6 mentions; 0 submissions, 6 comments20222023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 4 mentions; 0 submissions, 4 comments2024-01-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 9 mentions; 0 submissions, 9 comments2025-01-01 00:00:00 UTC to 2026-01-01 00:00:00 UTC (exclusive): 8 mentions; 0 submissions, 8 comments2026-01-01 00:00:00 UTC to 2027-01-01 00:00:00 UTC (exclusive): 5 mentions; 1 submissions, 4 comments. Incomplete calendar period.2026*

* An incomplete calendar period is marked with an outlined bar. Its count is not directly comparable with a full period.

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20192019-01-01 00:00:00 UTC2020-01-01 00:00:00 UTC422
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC514
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC808
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC606
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC404
20242024-01-01 00:00:00 UTC2025-01-01 00:00:00 UTC909
20252025-01-01 00:00:00 UTC2026-01-01 00:00:00 UTC808
2026 (partial)2026-01-01 00:00:00 UTC2027-01-01 00:00:00 UTC514

From the project README

An excerpt from the repository, fetched Nov 13, 2026.

Read the project’s introduction
Microsoft's C++ Standard Library This is the official repository for Microsoft's implementation of the C++ Standard Library (also known as the STL), which ships as part of the MSVC toolset and the Visual Studio IDE. Our Changelog tracks which updates to this repository appear in each VS release. Our Status Chart displays our overall progress over time. Join our Discord server. (STL-CI build status) (STL-ASan-CI build status) What This Repo Is Useful For If you're a programmer who just wants to use the STL, you don't need this repo. Simply install the Visual Studio IDE and select the "Desktop development with C++" workload. If you want to participate in the STL's development, welcome! You can report issues, comment on pull requests, and learn about what we're working on. You can also submit pull requests to fix bugs or add features: see CONTRIBUTING.md for more information. Finally, you can take our code and use it in other apps and libraries (according to the terms of our license, like everything else). GitHub Migration Status We're in the process of moving all of our work on the STL to GitHub. Current status: Code: Done. Our source code is available under the Apache License v2.0 with LLVM Exception. (See LICENSE.txt and NOTICE.txt for more information.) Build System: In progress. We're working on a CMake build system, which is currently capable of building one flavor of the STL (native desktop). We need to extend this to build all of the flavors required for the MSVC toolset (e.g. /clr, /clr:pure, OneCore, Spectre). Until that's done, we're keeping our legacy build system around in the stl/msbuild subdirectory. (We're keeping those files in this repo, even though they're unusable outside of Microsoft, because they need to be updated whenever source files are added/renamed/deleted. We'll delete the legacy machinery as soon as possible.) Tests: In progress. We rely on three test suites: std, tr1, and libcxx. We've partially ported std and tr1, and fully ported libcxx to run under lit using the various configurations/compilers we test internally. Continuous Integration: In progress. We've set up Azure Pipelines to validate changes to the repository. Currently, it builds the STL for x64, x86, ARM64, and ARM64EC. Also, it strictly verifies that all of our files have been formatted with clang-format and follow our other whitespace conventions. Contribution Guidelines: Coming soon. Working on the STL's code involves following many rules. We have codebase conventions, Standard requirements, Microsoft-specific requirements, binary compatibility (ABI) requirements, and more. We're eager to begin accepting features and fixes from the community, but in addition to setting up a CI system, we need to write down all of the rules that are currently stored in our brains. (The ABI rules may be useful to other C++ libraries.) Issues: In progress. We're going to use GitHub issues to track all of the things that we need to work on. This includes C++20 features, LWG issues, conformance bugs, performance improvements, and other todos. There are approximately 200 active bugs in the STL's Microsoft-internal database; we need to manually replicate all of them to GitHub issues. Currently, the cxx20 tag and LWG tag are done; every remaining work item is tracked by a GitHub issue. The bug tag and enhancement tag are being populated. Plans: In progress. We're writing up our Roadmap. Goals We're implementing the latest C++ Working Draft, currently N5054, which will eventually become the next C++ International Standard. The terms Working Draft (WD) and Working Paper (WP) are interchangeable; we often informally refer to these drafts as "the Standard" while being aware of the difference. (There are other relevant Standards; for example, supporting /std:c++14 and /std:c++17 involves understanding how the C++14 and C++17 Standards differ from the Working Paper, and we often need to refer to the C Standard Library and ECMAScript regular expression specifications.) Our primary goals are conformance, performance, usability, and compatibility. Conformance: The Working Paper is a moving target; as features and LWG issue resolutions are added, we need to implement them. That can involve a lot of work because the STL is required to behave in very specific ways and to handle users doing very unusual things. Performance: The STL needs to be extremely fast at runtime; speed is one of C++'s core strengths and most C++ programs use the STL extensively. As a result, we spend more time on optimization than most general-purpose libraries. (However, we're wary of changes that improve some scenarios at the expense of others, or changes that make code significantly more complicated and fragile. That is, there's a "complexity budget" that must be spent carefully.) Usability: This includes parts of the programming experience like compiler throughput, diagnostic messages, and debugging checks. For example, we've extensively marked the STL with [[nodiscard]] attributes because this helps programmers avoid bugs. Compatibility: This includes binary compatibility and source compatibility. We're keeping VS 2026 binary-compatible with VS 2015-2022, which restricts what we can change in VS 2026 updates. (We've found that significant changes are possible even though other changes are impossible, which we'll be documenting in our Contribution Guidelines soon.) While there are a few exceptions to this rule (e.g. if a feature is added to the Working Paper, we implement it, and then the feature is significantly changed before the International Standard is finalized, we reserve the right to break binary compatibility because /std:c++latest offers an experimental preview of such features), binary compatibility generally overrides all other considerations, even conformance. Source compatibility refers to being able to successfully recompile user code without changes. We consider source compatibility to be important, but not all-
Read the full README on GitHub

What Hacker News says

9 sources
I believe the impl you link to is not fully standards compliant, and has an approximate soln. MSFT's one is totally standards compliant and it is a very different beast: https://github.com/microsoft/STL/blob/main/stl/inc/charconv Apart from various nuts and bolts optimizations (eg not using locales, better cache friendless, etc...) it also uses a novel algorithm which is an order of magnitude quicker for many floating points tasks (https://github.com/ulfjack/ryu). If you actually want to learn about this, then watch the video I linked earlier.
In C++ String Conversion: Exploring std:from_chars in C++17 to C++26
SRWLocks are a Windows feature, not a Rust feature, so you're looking in the wrong place. Here's STL's (nominative determinism at work) GitHub issue for Microsoft's C++ stdlib implementation about this https://github.com/microsoft/STL/issues/4448 Here's the C++ Reddit thread where the bug was shown: https://www.reddit.com/r/cpp/comments/1b55686/maybe_possible... Here's the Rust change which was merged for 1.78: https://github.com/rust-lang/rust/pull/121956/
In Rust Atomics and Locks (2023)
Microsoft does officially call their implementation of the C++ Standard Library in MSVC "the STL." This is due to historical confusion, of course, but it persists to this very day in official materials. Check out the name of this repository and the way that they refer to it in the readme text. Always the acronym "STL" and never "Standard Template Library" so we can all pretend it simply stands for "C++ Standard Library" now. https://github.com/microsoft/STL
In Driving Compilers
00106 template<typename _InputIterator, typename _Tp, typename _BinaryOperation> 00107 _Tp 00108 accumulate(_InputIterator __first, _InputIterator __last, _Tp __init, 00109 _BinaryOperation __binary_op) 00110 { 00111 // concept requirements 00112 __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>) 00113 __glibcxx_requires_valid_range(__first, __last); 00114 00115 for (; __first != __last; ++__first) 00116 __init = __binary_op(__init, *__first); 00117 return __init; 00118 } https://gcc.gnu.org/onlinedocs/libstdc++/libstdc++-html-USERS-4.0/stl__numeric_8h-… It's just a loop. The compiler is doing all of the same transformations regardless of whether you use the higher order function or jus
Read the rest
t write a loop yourself. -------------- _STD_BEGIN _EXPORT_STD template <class _InIt, class _Ty, class _Fn> _NODISCARD _CONSTEXPR20 _Ty accumulate(const _InIt _First, const _InIt _Last, _Ty _Val, _Fn _Reduce_op) { // return noncommutative and nonassociative reduction of _Val and all in [_First, _Last), using _Reduce_op _STD _Adl_verify_range(_First, _Last); auto _UFirst = _STD _Get_unwrapped(_First); const auto _ULast = _STD _Get_unwrapped(_Last); for (; _UFirst != _ULast; ++_UFirst) { #if _HAS_CXX20 _Val = _Reduce_op(_STD move(_Val), *_UFirst); #else // ^^^ _HAS_CXX20 / !_HAS_CXX20 vvv _Val = _Reduce_op(_Val, *_UFirst); #endif // ^^^ !_HAS_CXX20 ^^^ } return _Val; } https://github.com/microsoft/STL/blob/63354c3fa9c1fb2ab1fccb58c47d23c6af1c290f/stl… Also just a loop in MS' standard lib.
In Clever code is probably the worst code you could write (2023)
Again, they are barely functional. MSVC chokes on many standard-defined constructs: https://github.com/microsoft/STL/issues/1694 clang does not claim to be "mostly usable" at all - most papers are not implemented: https://clang.llvm.org/cxx_status.html#cxx20 And gcc will only start ot be usable with CMake when version 14 is released - that has not happened yet. And, as I mentioned before, IDE support is either buggy (Visual Studio) or non-existing (any other IDE/OS). So you're off to writing in a text editor and hoping your compiler works to a somewhat usable degree. Yes, at some point people should start using modules, I agree, but to advise library maintainers to ship modularized code... the tooling just isn't there yet. I mean, the GitHub issue is Microsoft trying to ship their standard library modularized, they employ some of the most
Read the rest
capable folks on the planet and pay them big money to get that done, while metaphorically sitting next to the Microsoft compiler devs, and they barely, barely get it done (with bugs, as they themselves mention). This is too much for most other library maintainers.
In Show HN: Logfmtxx – Header only C++23 structured logging library using logfmt
Notice that there are in practice three distinct implementations of the C++ standard library. They're all awful to read though, here's Microsoft's std::vector https://github.com/microsoft/STL/blob/main/stl/inc/vector However you're being slightly unfair because Rust's Vec is just defined (opaquely) as a RawVec plus a length value, so let's link RawVec, https://doc.rust-lang.org/src/alloc/raw_vec.rs.html -- RawVec is the part responsible for the messy problem of how to actually implement the growable array type. Still, the existence of three C++ libraries with slightly different (or sometimes hugely different) quality of implementation means good C++ code can't depend on much beyond what the ISO document promises, and yet it must guard against the nonsense inflicted by all three and by lacks of the larger language. In particular everything
Read the rest
must use the reserved prefix so that it's not smashed inadvertently by a macro, and lots of weird C++ idioms that preserve performance by sacrificing clarity of implementation are needed, even where you'd ordinarily sacrifice to get the development throughput win of everybody know what's going on. For example you'll see a lot of "pair" types bought into existence which are there to squirrel away a ZST that in C++ can't exist, using the Empty Base Optimisation. In Rust the language has ZSTs so they can just write what they meant.
In Overview: What are Cpp2 and cppfront? How do I get and build cppfront?

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.