|
|
template<typename T = std::byte> |
| T * | alloc (size_t n=1) |
| |
|
template<typename T = void> |
| void | free (T *ptr) |
| |
|
void | reset () |
| |
|
bool | operator== (abstract_memory_context &c) noexcept |
| |
|
bool | operator!= (abstract_memory_context &c) noexcept |
| |
|
| operator::MemoryContext () |
| |
|
::MemoryContextCallback * | register_reset_callback (::MemoryContextCallbackFunction func, void *arg) |
| |
| template<typename T , typename... Args> |
| T * | construct (Args &&...args) |
| |
|
void | delete_context () |
| |
| auto | operator() (auto thunk) |
| |
|
|
virtual ::MemoryContext | _memory_context ()=0 |
| |
◆ construct()
template<typename T , typename... Args>
| T * cppgres::abstract_memory_context::construct |
( |
Args &&... |
args | ) |
|
|
inline |
Allocate and construct an object of type T in this memory context, registering a reset callback that runs its destructor when the context is reset or deleted.
Exception-safe: everything that can throw (allocation, construction) happens before the callback is registered, and registration itself cannot fail.
◆ operator()()
| auto cppgres::abstract_memory_context::operator() |
( |
auto |
thunk | ) |
|
|
inline |
Execute a callable within this memory context, respecting exceptions
The documentation for this struct was generated from the following file: