std::span. No separate build step is required.
Installation
Copyzinc.hpp into your project:
libzinc_core at build time:
SharedRegion
create
std::system_error on failure. The error code maps to the negated Zinc error code.
open
bytes
Returns astd::span<std::byte> backed by the shared memory mapping. No copying occurs.
capacity
notify
wait
true on notification, false on timeout.
RAII semantics
SharedRegion is move-only. It cannot be copied. The handle closes automatically when it goes out of scope.
Complete example
try_wait() consumes a pending notification without blocking.
Requirements
- C++20 or later (for
std::span) - A C++ compiler that supports
std::spanon Linux or macOS - The
zinc_coreshared library on the library search path at runtime
