Similarity analysis · libycxx 46874a98be69
How similar are the C++ standard libraries?
libycxx is compared with libstdc++, libc++ and the MSVC STL, and those three with each other, in 43 library areas and on whole-library fingerprints, against a positive control of known derived code. Regenerated from pinned sources on every build of this site.
Why this exists
- libycxx was written by AI agents (Claude, directed by the author) from the C++ working draft, without access to other standard libraries' sources during development.
- The models behind those agents were trained on large amounts of public code that very likely includes libstdc++, libc++ and the MSVC STL. Not having the sources open does not by itself show that the result is independent: memorised code could resurface without anyone looking at a source file. That is why libycxx is not called a clean room.
- Licensing makes this concrete. libstdc++ is under the GPL v3 with the GCC Runtime Library Exception; libc++ and the MSVC STL are under the Apache License 2.0 with LLVM Exceptions. Code derived from them would carry their obligations, so adopters need evidence, not assurances.
- This analysis is that evidence. It measures libycxx's similarity to each of those libraries. As the yardstick, it also measures the libraries' similarity to each other and to a positive control of known derived code. It is regenerated from pinned sources on every build, and its judgments are committed in the repository, so anyone can check them and re-run it.
- It cannot prove a negative. It shows how libycxx compares with independently written libraries and with derived code, and it lists every match it could not explain.
Style control: with qualification and specifiers normalised for every library, libycxx's JPlag medians are 0.67–0.91× the largest established-pair median over all areas; restricted to C++20-era components as well, about 1.1–1.3× (style control).
All four libraries, every pair
The analysis is symmetric: libstdc++, libc++ and the MSVC STL are compared with each other exactly as libycxx is compared with them. Each cell is the median over the library areas of the JPlag similarity (all three metrics, quartiles, per-area tables).
| libycxx | libstdc++ | libc++ | MSVC STL | C++03 fork | |
|---|---|---|---|---|---|
| libycxx | — | 0.071 | 0.120 | 0.104 | 0.075 |
| libstdc++ | 0.071 | — | 0.065 | 0.039 | 0.053 |
| libc++ | 0.120 | 0.065 | — | 0.071 | 0.566 |
| MSVC STL | 0.104 | 0.039 | 0.071 | — | 0.045 |
| C++03 fork | 0.075 | 0.053 | 0.566 | 0.045 | — |
How it was measured
- Token and structure metrics: JPlag, and two k-gram comparisons (identifiers abstracted, and identifiers kept with each library's naming conventions normalised), in 43 library areas.
- Fingerprints over whole libraries: internal names, numeric literals and tables, string literals, comments, misspellings, and tuning constants and design choices.
- Calibration: the established libraries against each other, and a positive control of known derived code (libc++ against its C++03 fork).
- Judgments are committed in advance in docs/similarity; every result is matched to a finding, a reviewed group or a stated rule, or listed as unreviewed.
- Regenerated on every site build from the pinned sources; method, normalisation and limitations.
Sources
| Library | Version | Parts compared |
|---|---|---|
| libycxx | 46874a98be69 (2026-11-24) | include/, src/ |
| libstdc++ | GCC 16.2.0 | include/, src/, libsupc++/, config/; libiberty's demangler |
| libc++ and libc++abi | LLVM 23.1.2 85ac56026243 | libcxx/include, libcxx/src, libcxxabi/include, libcxxabi/src |
| libc++'s C++03 fork (positive control) | LLVM 23.1.2, libcxx/include/__cxx03 (forked from libc++ in 2024 and maintained separately since) | libcxx/include/__cxx03 |
| MSVC STL | microsoft/STL main of 2026-10-06 da52dc0fcadb | stl/inc, stl/src |
| libcxxrt | libcxxrt master of 2025-02-25 a6f71cbc3a1e | src/ (ABI areas only) |
Agents implementing libycxx do not read these pages: the findings, fingerprint-item and tuning pages quote the other implementations. The repository holds no code from them; the tools fetch the pinned sources at build time.