microsoft/STL
View on GitHub ↗ ★ 11,180 C++
MSVC's implementation of the C++ Standard Library.
49 mentions on Hacker News by 30 people: 4 stories, 45 comments · first 2019-09-17 · latest 2026-07-26
20082026
-
…is standardese, you get them all bounds checked by using specific compiler flags. Here is for VC++ https://github.com/microsoft/STL/blob/2a62bf7b4079f0a3e33ec8... You just have to define the proper iterator level for enabling bounds…
comment by pjmlp · 2026-07-26 · in Memory safety absolutists -
…to UTF-16 for WriteConsoleW(), which std::print() usually calls (unless not running in a console) ( https://github.com/microsoft/STL/blob/488e7953685722d2d6666f... ).
comment by Longhanks · 2026-06-23 · in Improvements to Std:Format in C++26 -
…took MSVC's STL until 2024 to finally drop support for Windows 7 (whose final ESU update was 2023): https://github.com/microsoft/STL/issues/4858 - it isn't unlikely that they (STL maintainers) are not going to get approval for dropping…
comment by Longhanks · 2026-06-02 · in Coreutils for Windows -
▲ 1
Microsoft STLstory by tosh · 2026-05-22 · 0 comments
-
Outsiders can't see the internal ticket, but e.g. https://github.com/microsoft/STL/issues/4448 This is simply a bug, it's an implementation mistake, it's even possible to imagine from what we do know about the implementation inside Windows…
comment by tialaramex · 2026-03-26 · in Apple randomly closes bug reports unless you "verify" the bug remains unfixed -
…wanted to open-source VCRuntime / VCStartup but it was ~vetoed~ not fully approved by some people: https://github.com/microsoft/STL/issues/4560#issuecomment-23... , https://www.reddit.com/r/cpp/comments/1l8mqlv/is_msvc_ever_g...
comment by okanat · 2025-10-25 · in The Journey Before main() -
…s://doc.rust-lang.org/src/alloc/sync.rs.html (where Rust's Arc is defined) ... ... good luck to me in https://github.com/microsoft/STL/blob/main/stl/inc/memory There are tricks to cope with C++ macros not being hygienic, layered on top of…
comment by tialaramex · 2025-08-31 · in Shared_ptr<T>: the (not always) atomic reference counted smart pointer (2019) -
…see this post was from 2019. The MSVC standard library has been open source for several years now. https://github.com/microsoft/STL Though to be perfectly honest, setting a breakpoint and looking at the disassembly is probably easier than…
comment by TillE · 2025-08-31 · in Shared_ptr<T>: the (not always) atomic reference counted smart pointer (2019) -
…than 8 bytes it devolves to a linked list. And it can't be fixed due to binary compatibility. https://github.com/microsoft/STL/issues/147 By contrast the GNU implementation has a block size of 512 bytes Fortunately in high performance…
comment by nly · 2025-08-07 · in A fast, growable array with stable pointers in C -
…The maintainers are actively working on "hardening" features to enable more secure C++ ( https://github.com/microsoft/STL/wiki/STL-Hardening ). Unless you specify what "best" or "a library's quality" means to you, MSVC STL is excellent and…
comment by Longhanks · 2025-03-25 · in Writing your own C++ standard library from scratch -
…use the term interchangeably, both "STL" and "C++ standard library" refer to the same thing. https://github.com/microsoft/STL/blame/main/README.md#L3
comment by Longhanks · 2025-03-25 · in Writing your own C++ standard library from scratch -
…known as STL and the readme continues to use the term STL to refer to the C++ standard library. ( https://github.com/microsoft/STL , https://github.com/microsoft/STL/commit/219514876ea86491de19... , https://github.com/microsoft/STL/blame/ma…
comment by Longhanks · 2025-03-25 · in Writing your own C++ standard library from scratch -
…GitHub issue for STL (this time the stdlib, a GitHub project, although it was opened by the person) https://github.com/microsoft/STL/issues/4448 and it's confirmed in that issue this is a bug in SRWLock, thus no work for STL† (either the…
comment by tialaramex · 2025-03-24 · in The case of the critical section that let multiple threads enter a block of code -
…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…
comment by deeringc · 2024-10-14 · in C++ String Conversion: Exploring std:from_chars in C++17 to C++26 -
…(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/1b55…
comment by tialaramex · 2024-08-14 · in Rust Atomics and Locks (2023) -
…find anything on that is because it's internal only and not a feature you're actually meant to use? https://github.com/microsoft/STL/issues/586 > We talked about this at the weekly maintainer meeting and decided that we're not comfortable…
comment by mike_hearn · 2024-07-31 · in Translating All C to Rust (TRACTOR) -
…"Standard Template Library" so we can all pretend it simply stands for "C++ Standard Library" now. https://github.com/microsoft/STL
comment by electroly · 2024-07-29 · in Driving Compilers -
Isn't the msvc implementation called the stl? https://github.com/microsoft/STL
comment by 3836293648 · 2024-06-27 · in How the STL Uses Explicit -
…/ !_HAS_CXX20 vvv _Val = _Reduce_op(_Val, *_UFirst); #endif // ^^^ !_HAS_CXX20 ^^^ } return _Val; } https://github.com/microsoft/STL/blob/63354c3fa9c1fb2ab1fccb58c47d23c6af1c290f/stl/inc/numeric#L24 Also just a loop in MS' standard lib.
comment by knome · 2024-05-22 · 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:…
comment by Longhanks · 2024-04-04 · in Show HN: Logfmtxx – Header only C++23 structured logging library using logfmt -
…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…
comment by tialaramex · 2024-04-01 · in Overview: What are Cpp2 and cppfront? How do I get and build cppfront? -
> I remember an issue where it was discussed and agreed uppon by all https://github.com/microsoft/STL/issues/3945
comment by delta_p_delta_x · 2024-02-04 · in #include <rules> (2010) -
…library. I think of myself as a competent programmer / computer scientist. I couldn't write this: https://github.com/microsoft/STL/blob/f392449fb72d1a387ac502...
comment by uw_rob · 2023-11-02 · in C++23: Removing garbage collection support -
…correctness even in edge-cases is what large libraries do better than throwaway bits of code. [1]: https://github.com/microsoft/STL/blob/6735beb0c2260e325c3a4c...
comment by delta_p_delta_x · 2023-09-28 · in The most copied StackOverflow snippet of all time is flawed (2019) -
…functions, a few are non-trivial, but many are, and of course they take up hundreds of lines. https://github.com/microsoft/STL/blob/main/stl/inc/vector is almost 4000 lines . As I said, C++ makes even a trivial function into a horrible…
comment by tialaramex · 2023-03-28 · in Zig Quirks -
OK, here is MS STL: https://github.com/microsoft/STL/blob/main/stl/inc/vector#L1... Whatever _STL_VERIFY does, pop_back can't throw, as it's marked noexcept. EA STL: https://github.com/electronicarts/EASTL/blob/master/include/... Default…
comment by planede · 2023-02-09 · in Can sanitizers find the two bugs I wrote in C++? -
FWIW it looks like they're planning to kill it off for release builds: https://github.com/microsoft/STL/issues/277 In my experience with them, the performance hit is far more substantial that a few percent, except in situations where the…
comment by int_19h · 2022-12-01 · in How much does Rust's bounds checking cost? -
…MSVC at the moment (Standard Library Modules): https://en.cppreference.com/w/cpp/compiler_support https://github.com/microsoft/STL/pull/3108
comment by Sin2x · 2022-10-30 · in A Tour of C++ (Third edition) -
…array of template metaprogramming to meet the standard's requirements- see e.g. Microsoft's here: https://github.com/microsoft/STL/blob/main/stl/inc/optional#... . This isn't a criticism of the team behind this code, it's just what it…
comment by Rusky · 2022-09-22 · in C++ by Example -
…to tell those people to look at the name of the MSVC implementation of the C++ standard library. https://github.com/microsoft/STL Yes, historically "the STL" was a subset of what became the C++ standard library. But unless you want to tell…
comment by MauranKilom · 2022-06-20 · in Advancing the state of the art for std:unordered_map implementations -
…support is a work in progress (MSVC's STL, which I work on, is the furthest along - see https://github.com/microsoft/STL/issues/1694 for status), but header units are showing significant improvements in compiler throughput (build speed).…
comment by StephanTLavavej · 2022-03-07 · in C++ Cheat Sheets -
…their knowledge, not because anyone actually experiences confusion nowadays. Supporting evidence: https://github.com/microsoft/STL
comment by MauranKilom · 2022-01-08 · in Folly: An open-source C++ library developed and used at Facebook -
…Microsoft STL issues are usually quite fun and entertaining, at least if you don't have to use it: https://github.com/microsoft/STL/issues/1603
comment by lionkor · 2021-12-26 · in Microsoft forked MIT licensed repo and changed the copyright [fixed] -
…actually. The MSVC STL uses 16 byte (or however large your element is, if greater) chunks. Source: https://github.com/microsoft/STL/blob/main/stl/inc/deque#L56... They have made clear that this won't be changed, for ABI stability reasons.…
comment by MauranKilom · 2021-11-28 · in The time complexity of the libc++ deque push_front implementation is O(log n) -
Because some C++20 features can only be fully compliant with an ABI break. https://github.com/microsoft/STL/issues/1814 https://devblogs.microsoft.com/cppblog/msvc-cpp20-and-the-st...
comment by pjmlp · 2021-11-25 · in Microsoft_craziness.h (2018) -
…of "learn". Let me cite a single line from the MSVC implementation of the C++ standard library ( https://github.com/microsoft/STL/blob/main/stl/inc/xtree ): using _Scary_val = _Tree_val<conditional_t<_Is_simple_alloc_v<_Alnode>,…
comment by MauranKilom · 2021-10-25 · in To learn a new language, read its standard library -
…test suite for every PR, skipping a set of known failures (for product bugs, test bugs, etc.), see https://github.com/microsoft/STL/blob/main/tests/libcxx/expe... . (I work on MSVC’s STL.)
comment by StephanTLavavej · 2021-08-04 · in EASTL: An Alternative C++ Standard Library -
…and whistles (via the STL). You can see here (1) it's a transparent wrapper around a raw array. (1) https://github.com/microsoft/STL/blob/62137922ab168f8e23ec1a...
comment by duped · 2021-05-24 · in C++ Software Security Sins: Basic Issues -
…can really affect performance. https://blog.dbi-services.com/aws-postgresql-on-graviton2-aa... https://github.com/microsoft/STL/issues/488 We are about 9-14 months away from the right pieces making their way through the software ecosystems…
comment by sitkack · 2021-04-27 · in Arm Announces Neoverse V1, N2 Platforms and CPUs, CMN-700 Mesh -
Apparently there are multiple fixes, some of which are said to be simpler. See https://github.com/microsoft/STL/issues/727 and the cited comments within, which quote Knuth. (I'm learning a lot by having this PR appear on HN!)
comment by StephanTLavavej · 2020-04-17 · in Fix Boyer-Moore searcher with the Rytter correction -
…test case for this is (demonstrating all the different ways that chrono literals can be accessed): https://github.com/microsoft/STL/blob/31419650d472932dd24b9c...
comment by StephanTLavavej · 2020-04-17 · in Fix Boyer-Moore searcher with the Rytter correction -
There are a bunch of test cases here: https://github.com/microsoft/STL/pull/724/commits/a7da5cce8c... Looks like it can happen with quite small needles, eg. "aa".
comment by nostrademons · 2020-04-17 · in Fix Boyer-Moore searcher with the Rytter correction -
▲ 193
Fix Boyer-Moore searcher with the Rytter correctionstory by HenryR · 2020-04-17 · 53 comments
-
MSVC’s STL (which I work on) is now open source, under the Apache+LLVM license: https://github.com/microsoft/STL . At this time, there are no plans to open source the MSVC compiler.
comment by StephanTLavavej · 2020-02-10 · in Clang vs. other open-source compilers -
▲ 2
A long term issue. std:deque in Visual C++ is TOOOOOOOOOOOOOOOOOOO Slowstory by fortran77 · 2019-10-27 · 0 comments
-
https://github.com/microsoft/STL/blob/master/stl/inc/regex#L... is the code. Looks pretty simple, check if it matches the backreferences and error/continue. The handling of repetition is more revealing, it doesn't appear to have "states"…
comment by Mathnerd314 · 2019-09-17 · in MSVC's implementation of the C++ Standard Library -
…because backreferences are part of the standard. How are backreferences implemented here? 1: https://github.com/microsoft/STL/blob/master/stl/inc/regex
comment by ridiculous_fish · 2019-09-17 · in MSVC's implementation of the C++ Standard Library -
▲ 372
MSVC's implementation of the C++ Standard Librarystory by AlexeyBrin · 2019-09-17 · 150 comments