The Apache C++ Standard Library: Rogue Wave's implementation of the C++ Standard Library, open-sourced in 2005, developed through 2008, dormant after, and retired to the Apache attic in 2012. It is a complete implementation of the library specified by ISO/IEC 14882:2003, with its own iostreams, locales, strings and containers, built by a configuration system that characterizes the compiler and the C library with a few hundred small test programs rather than trusting version numbers.
This repository is a revival. It forks from the tip of the 4.2.x maintenance line, the last released lineage, and builds it against a current toolchain: GCC 16 and glibc 2.44 at the time of writing. The tree had not been compiled in earnest since 2012, and the toolchain had moved a great deal in the meantime. Everything that broke gets the same treatment: find out what the platform now offers, write a characterization for it, and let the tree branch on the answer.
The original README is kept untouched beside this file. It is the
complete manual for the library's layout, configuration macros, build
system and platform notes as of 4.2.2, and it remains accurate for
everything the revival has not changed. Section 8.3.4's function
macros, _RWSTD_NO_<F>, _RWSTD_NO_<F>_IN_LIBC and _IN_LIBM, are
gone since a44256a6; doc/notes/history-libc-declarations.md records
what they did.
The library builds clean. The test driver builds. Every test builds
and the suite runs in full under its own harness. The results are
pinned under doc/notes/baseline for each configuration
measured, and doc/notes/ref-test-baseline.md reads them: what fails, why where
that is known, and what is intended for each. TODO carries the
same failures as queue entries, in the chapter of the part of the
tree they belong to. bin/driver runs the certification: each
configuration built and run from an export of one revision, a page
per build, and each table compared with its pin.
The write-ups live under doc/notes, one directory, the kind in
the file name's prefix. ref- documents describe the library as it
is, for a reader rather than for the record, and are kept current;
the first is the walk through basic_string and its replace
family. analysis- documents are investigations, the record of work
on failures, written as it happened. primer- documents explain the
platform the library stands on; history- documents record machinery
the tree no longer has; plan- documents survey work not
yet done. Of the analyses, the first traces the library's __mbstate_t clash with glibc through three
epochs of the C library's headers.
The target is the library of ISO/IEC 14882:2003, complete, with the suite clean. The revival does not raise the implementation language past C++98 and does not implement later standards. libstdc++, libc++ and the Microsoft library already serve those.
The interface is the standard's alone. The additions the library
carried beyond it, once switched off by _RWSTD_STRICT_ANSI, are
gone with the switch; doc/notes/ref-conformance.md names what left
and the choices that stay.
The library has three uses as it is:
- A probe of the toolchain. A suite of ten million assertions against a standard that stopped moving is a steady instrument: a new compiler or C library shows up as a change in its tables.
- A reference implementation to read. It is a complete C++03 library
with its own locales and its own configuration, tied to no compiler
vendor. The
ref-documents underdoc/notesdescribe it. - An oracle for other libraries. Most of the suite checks standard
behaviour. Run against another library, it would test that one;
TODOhas the entry.
The 4.2.x binary interface is not kept. The version rule stands: the first number is source compatibility, the second binary.
The build is out of tree. From the source directory:
make BUILDDIR=$HOME/build/stdcxx-build/15D BUILDTYPE=15D configconfig runs the characterizations and writes config.h into the
build directory. It is serial by design: each characterization may
depend on the answers of others, and the walk resolves those
dependencies on demand. It takes about twenty seconds and cannot be
parallelized. Then, from the build directory:
cd $HOME/build/stdcxx-build/15D
make -j16 lib # the library
make -j16 rwtest # the test driver
make -j16 tests # the tests
make -j16 examples # the examplesThe phases are serial with respect to one another and parallel
within. A bare make -j at the top level was never the idiom.
BUILDTYPE selects the build: the number is the level of debugging,
optimization and thread safety, the letter is archive or shared and
narrow or wide. 15D is debug, shared, threads, 64-bit. The original
README, section 5, has the full table. Command-line CXXOPTS and
CPPOPTS reach the build but not the configuration, by design: a
build directory describes itself, and anything the configuration must
see goes in the compiler's config file under etc/config.
GNU make, a C++ compiler, and the C library the compiler targets. Nothing else. There is no autoconf, no CMake, and there will not be.
The supported matrix is GCC and Clang on x86 and x86-64 Linux, with
aarch64 Linux to follow. Everything else the tree once built on, the
vendor compilers and Unixes of 2008, Darwin and the BSDs, and Windows
with Visual Studio, was retired in September 2026:
doc/notes/plan-platform-state.md is the survey behind the decision and
its last chapter the record of what went. Both compilers build the
library, the driver, the tests and the examples, and the suite gives
the same table under both; the Clang configuration is
CONFIG=gcc.config CXX=clang on the config line, and
doc/notes/analysis-clang.md records what it took. The characterizations
stayed: what they detect is a property of the toolchain in front of
them, not of a platform list.
No version test on GCC remains in the tree: the blocks that served gcc
2, 3 and 4 went in October 2026, and the oldest compiler the library
builds with is the oldest the certification runs.
- Nothing here is easy pickings. Twenty years of curated changes, everything in the tree with a purpose. A fix that looks like an oversight is presumed to be a design until the history says otherwise. The full history since the 2005 import is in git, and the commit messages say why.
- Characterize, never pin. A missing or changed feature is detected
by a configuration test under
etc/config/srcand gated by the_RWSTD_NO_*macro it yields. The compiler is never bent back with-stdor-Dto make the tree compile. - The tree is C++98 and stays so. Null pointers are the literal
0. - New code takes the layout of the code around it.
.clang-formatat the root states that layout as far as the tool can; it is for the lines you add (git clang-format, or the region in the editor), never for a whole file. Existing lines are not reformatted. - Commit messages carry an
area: what it doessubject, the why in prose, then the changes as GNU ChangeLog bullets,* file (symbol): change., in the grammar the history is written in. TheChangeLogfile itself is empty: git holds the same information. Commits before September 2026 open with the ChangeLog date line instead of a subject; they are left as they are.
| path | what |
|---|---|
include/ |
the public headers; rw/ and loc/ hold the private ones |
src/ |
the library sources |
etc/config/ |
the configuration system: makefiles, compiler config files, and the characterizations under src/ |
tests/ |
the test suite; include/ and src/ hold the test driver |
examples/ |
example and tutorial programs |
util/ |
the locale utilities and the test harness's exec |
doc/ |
the original HTML manuals; notes/ for the revival's write-ups, the kind in the file name's prefix, and notes/baseline/ for the pinned suite tables |
TODO |
the queue, one chapter per part of the tree, priority order within a chapter |
README |
the original manual, untouched |
Apache License 2.0; see LICENSE. NOTICE carries the copyright
notices that apply.