Skip to content
Welcome to the new CppUtils documentation!

CppUtils Library

Modular C++26 building blocks for compilers and modern applications.

CppUtils is structured around several major modular libraries (unit testing, networking, mesh topology) alongside a rich collection of specialized utilities. Modern C++20 modules allow you to import the entire suite at once (import CppUtils;) without inflating your final binary, as only the components actually consumed by your application are integrated at compile time.

CppUtils is built upon uncompromising core principles:

Rich & modular toolbox

Brings together core essentials (containers, concurrency, networking, parsing, unit tests, cryptography, etc.) to eliminate dependency proliferation. Powered by C++ modules, this breadth maximizes reusability with zero penalty:

  • Granular or all-in-one: import a specific submodule (import CppUtils.Container;) or the entire suite (import CppUtils;).
  • Zero binary bloat: only symbols actually invoked by your application are compiled into the final executable.
  • Hermetic isolation & faster builds: each module is compiled only once, drastically reducing build times compared to redundant preprocessor (#include) headers.

Non-invasive integration & design by contract

Zero architectural lock-in or contagion: CppUtils never attempts to dictate its types or colonize your codebase.

  • Non-invasive design & zero contagion: unlike invasive frameworks such as Qt that mandate proprietary meta-compilers (moc), closed types (QString, QByteArray), and heavy inheritance hierarchies, CppUtils remains strictly non-invasive and introduces zero viral dependencies: the goal is never to lock you into a proprietary ecosystem (vendor lock-in).
  • Design by contract: APIs are constrained through standard concepts (std::ranges::input_range, std::formattable, std::invocable, etc.) rather than bound to rigid, imposed types: your containers propagate without unnecessary copying or conversion overhead (explore design by contract with auto and concepts on my blog).
  • Targeted adoption: pick a single standalone component (MultiKeyMap, UniqueLocker) in complete autonomy without having to import the rest of the library.

Cutting-edge C++26 & zero technical debt

Continuously targets the latest language standard (C++26) to immediately deliver state-of-the-art capabilities: native modules, monadic operations, advanced concepts, enhanced safety, and reflection.

  • Zero legacy compromise: no artificial preservation of obsolete patterns or technical debt accumulation.
  • Pragmatic transition: targeted feature-test macros (__cpp_lib_*) ease compilation on recent compilers with partial C++26 standard library support, without burdening the codebase with backward-compatibility layers.
  • Future-proof architecture: continuous refactoring to keep the codebase clean, robust, and modern.

Performance & modern best practices

Maximum performance without ever sacrificing clarity or safety:

  • Readability & simplicity: clean, transparent, and self-documenting APIs that remove accidental complexity without hidden magic.
  • Uncompromising performance: strict zero-cost abstractions, cache-friendly memory layouts, and aggressive compile-time evaluation (constexpr, consteval).
  • Modern best practices: systematic RAII resource management, strong typing enforced by concepts, and elimination of preprocessor macros (several of these best practices are detailed on my blog).

If you find CppUtils useful and wish to support its independent development, you can sponsor the project on GitHub Sponsors:

Sponsor on GitHub

  • MorganCaron
  • Arthapz