English | 简体中文
ccc is a C++ utility library that provides modern C++ tools, including pipe operators, monadic expected, and more.
- Header-only and module-supported design for maximum flexibility.
- C++14 and later support (some features require C++17 or C++20).
#include "ccc/all.hh"Or, for specific components:
#include "ccc/expected.hh"
#include "ccc/pipe_operator_helper.hh"When using C++20 modules (if configured):
import ccc; // import all
import ccc.expected; // import expected component onlyccc.utility- Utility tools that implement higher-version C++ STL features in lower C++ standards- ccc.pipe_operator_helper - Pipe-style function invocation helpers
- ccc.expected - Monadic expected with optional criterion support
- ccc.inplace - Stack-allocated, compile-time fixed-capacity "in-place" containers
- ccc.resource_guard - RAII-based resource management with defer, try_finally, and with patterns
- ccc.when - Generalized switch-like expression inspired by Kotlin's when
This project uses CMake. To build:
cmake -S . -B build
cmake --build buildFor module support, configure with:
cmake -DCCC_USE_CPP_MODULES=ON ..Run tests with:
cmake -S . -B build -DCCC_BUILD_TESTS=ON
cmake --build build
cd build && ctest .This project can also be built with mcpp for C++23 module-based builds:
mcpp build # Build the library (module mode)
mcpp run -p test # Build and run all tests
mcpp pack # Package the release artifactThis project is licensed under the MIT License.