Skip to content

Repository files navigation

STDCORELIB

A small C++17 support library, for the things the standard library leaves to the platform.

Most of it exists because the answer differs between Windows and the rest of the world: console color, UTF-8 that survives a Windows console, launching a child process, loading a shared object. The rest is a handful of containers and utilities that kept getting rewritten.

Header-only where it can be, compiled where it has to be. No dependencies beyond the standard library, and Boost.Test for the test suite alone.

Requirements

  • C++17
  • CMake 3.16 or newer
  • Windows, Linux or macOS. MSVC, clang-cl, GCC and Clang are all built and tested.

Building

git clone https://github.com/stdware/stdcorelib.git
cd stdcorelib
cmake -B build -S . \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/path/to/install
cmake --build build --config Release
cmake --install build --config Release

Integration with CMake Projects

find_package(stdcorelibREQUIRED)
target_link_libraries(myappPRIVATEstdcorelib::stdcorelib)

Or as a subdirectory:

add_subdirectory(stdcorelib)
target_link_libraries(myappPRIVATEstdcorelib::stdcorelib)

Components

Component
Command lineDeclaring what a program takes, and reading back what it was given
Processes and librariesStarting a child process, loading a shared object
TextStrings, formatting, the console, UTF conversion
Containers and viewsarray_view, vlarray, linked_map, any
Type identityNaming a type without RTTI, and registries built on that
LoggingNamed categories with per-level switches and filter rules
JSON and CBOROne tree, both encodings
Platform and systemProgram and machine information, the Windows registry
UtilitiesFlags, scope guards, version numbers

Each carries its own description and an example. Build the stdcorelib_docs target with -DSTDC_BUILD_DOCS=ON, or read the headers, which is where that text lives.

Credits

Code derived from these is cited where it is used:

The test suites use:

The documentation is built and styled with:

License

MIT. See LICENSE.

About

C++ auxiliary core library.

Resources

Stars

5 stars

Watchers

2 watching

Forks

Releases

Packages

Contributors

Languages