|
Open C++ Libraries.org develop
|
Core module of the Open C++ Libraries (OCL), a collection of modern C++20 utilities built on top of Boost. Covers error handling, memory management, hashing, math, I/O, and cross-platform compatibility.
| Tool | Notes |
|---|---|
| CMake ≥ 3.22.1 | Build system |
| Clang | Preferred compiler |
| Boost | Core dependency |
| Git | Source checkout |
C++20 is required (CMAKE_CXX_STANDARD 20).
CMake options:
| Option | Effect |
|---|---|
INSTALL_OCL=ON | Install headers and targets via install_core.cmake |
EXTENSIONS_CXX_OCL=ON | Enable compiler-specific C++ extensions (off by default) |
Wraps a return_type (okay / err) and throws on unwanted states. Use eval_eq to construct from a comparison, then expect to assert success.
Thin wrappers over the standard smart pointers plus a delete_ptr that holds a raw pointer without taking ownership (uses boost::null_deleter).
Compile-time CRC-32 via the _crc32 UDL; runtime hashing through std::hash<ocl::crc_hash_trait>.
Arithmetic helpers (add, div, …) and equation/inequality solvers.
Find-and-replace for ${key}-style placeholders in strings.
Thin wrappers for running io_context loops with callable callbacks.
ocl::io::print / ocl::io::println and ocl::io::enable_stdio_sync.
Headers for platform-specific code paths:
| Header | Platform |
|---|---|
posix.hpp | POSIX (Linux, macOS) |
win_nt.hpp | Windows NT |
ne_system.hpp / ne_ant.hpp | NeAnt |
ant_os.hpp | Ant |
OCL tracks which headers are usable in freestanding (no OS) environments.
| Status | Headers |
|---|---|
| Half-Verified | option_fwd.hpp, is_same |
Distributed under the Boost Software License 1.0.
© 2023–2026 Amlal El Mahrouss, Ne.app, and OCL Authors.