Arene Base
Fundamental Utilities For Safety Critical C++
Loading...
Searching...
No Matches
memory: Facilities For Memory Region Manipulation

Arene Base provides facilities for managing the lifetime of objects within a region of memory.

The public header is

Public export header for the memory subpackage.

The Bazel target is

//:memory

Introduction

The memory subpackage provides backports of std::construct_at and std::destroy_at in the form of arene::base::construct_at and arene::base::destroy_at respectively.

arene::base::construct_at is a wrapper for placement-new, to construct an object at a specific address. It avoids the need to cast the supplied address to void* to avoid class-specific operator new overloads.

arene::base::destroy_at is a wrapper for a destructor call on the supplied object. After the call, the object has been destroyed, and pointers to it are invalid.