Clone this repo:

Branches

  1. c6262a4 clang-format: re-format for clang-19 by Patrick Williams · 3 days ago master
  2. d8e0af5 clang-format: re-format for clang-18 by Patrick Williams · 4 months ago
  3. ea1dc93 Fix MD040 warnings by George Liu · 5 months ago
  4. 7aa2a42 str/buf: Add append operator for fmtlib by William A. Kennington III · 8 months ago
  5. 2f6affd raw: Use a more selective exception by William A. Kennington III · 11 months ago

stdplus

stdplus is a c++ project containing commonly used classes and functions for the Linux platform. Note the goals of this project are to implement only the minimum set of features needed by the OpenBMC project and other users. You may find the included set of functions currently quite sparse.

This project provides the following primitives:

  • A movable and copyable RAII helper wrapper which is used for wrapping c-native types that have custom destruction or copy reference logic.
  • Functions for trivially configuring signals without having to do the normal signal set operations from libc
  • C-Style Error Handler that wrap c-style functions which return errnos and negative error values into functions that throw c++ exceptions.
  • String Utilities that focus on providing helpful wrappers like efficient string append and concatenation.

Dependencies

Test cases require google{test,mock}, valgrind, and lcov. It also requires the Meson Build System which can be installed following the instructions at mesonbuild.com.

Building

For a standard release build, you want something like:

meson setup -Dexamples=false -Dtests=disabled builddir
ninja -C builddir
ninja -C builddir install

For a test / debug build, a typical configuration is

meson setup -Dtests=enabled builddir
meson test -C builddir