Core utilities
By Ross Smith
This is a set of basic utilities that I use throughout my C++ code, collected here to avoid widespread duplication. Basically I put stuff in here when I get tired of re-implementing it in multiple projects.
Requires C++23. Not yet tested on all compilers.
rs-core/global.hpp
– Global utilitiesrs-core/alias.hpp
– Hard type aliasrs-core/arithmetic.hpp
– Arithmetic types and functionsrs-core/character.hpp
– Character functionsrs-core/constants.hpp
– Physical constantsrs-core/enum.hpp
– Enumeration helpersrs-core/format.hpp
– Formatting helpersrs-core/hash.hpp
– Hash functionsrs-core/io.hpp
– I/O utilitiesrs-core/iterator.hpp
– Iterator base classesrs-core/log.hpp
– Loggingrs-core/markup.hpp
– Text markuprs-core/mp-integer.hpp
– Multiple precision integersrs-core/random.hpp
– Random number generatorsrs-core/rational.hpp
– Rational numbersrs-core/scope.hpp
– Scope guardsrs-core/terminal.hpp
– Terminal controlrs-core/typename.hpp
– Type namesrs-core/uuid.hpp
– UUID classrs-core/version.hpp
– Version informationThere is a CMakeLists.txt
file, but this is usually only needed if you want
to run the unit tests. The library is header-only and can be installed simply
by copying or linking the rs-core
directory into somewhere on your include
path. Running
cmake --build . --config Release --target install
will do this, or you can just copy or symlink it by hand.
To use the library, just #include
the headers you want. No special link-time
options are needed.