cpp-stalin is a C++ standard library implementation
stalin currently only supports a small percentage of the standard. Feel free to contribute to any existing code, or start implementing something new.
Structure
include/- The main include directorysrc/- The source directory. Any implementations for non-template functions are heretest/- Test directory. Contains tests to ensure the functionality of cpp-stalin
Configuration
Stalin allows you to configure the library to your needs in the include/__config file.
- Defining
STALIN_CXX_STD_VERSION_XXwill set the library version to match the standard. - Defining
STALIN_CXX_STD_STRICTwill make the library comply more strictly to the standard. In non-strict mode stalin will add the[[maybe_unused]]and[[nodiscard]]attributes in various places, to silence and generate unused warnings where appropriate. - Defining
STALIN_CXX_STD_NO_IOwill preventbasic_filebufand the default streamscin,cout,cerrandclogas well as their wide counterparts from being defined. This reduces the actual dependencies1 2 of cpp-stalin to the basic memory management functionsmalloc,reallocandfreeand default types defined instddef.handstdio.h. - Defining
STALIN_CXX_STD_FREESTANDINGwill limit headers to the freestanding library standard. Including any other headers will do nothing.
1: In practice stalin also requires the rest of the C standard library for the using directives in the c* headers. Most modern
compilers support some way of checking whether a function or type exists so this shouldn't be a big issue.
2: Even if you don't declare/define these functions, your compiler likely won't complain, as long as the stalin functions using them aren't instantiated. This means that the required functions depend on your usage of the library.