guanaqo develop
Utilities for scientific software
Loading...
Searching...
No Matches
Memory & Pointer Helpers

Detailed Description

Pointer wrappers, lifetime helpers, and utility deleters.

Files

file  copyable-unique_ptr.hpp
 Clone-on-copy unique_ptr wrapper.
file  lifetime.hpp
 Fallback implementations for std::start_lifetime_as.
file  noop-delete.hpp
 Deleter that skips deallocation.

Classes

struct  guanaqo::copyable_unique_ptr< T >
 std::unique_ptr is move-only, this class wraps such a pointer and provides copy operations as well. More...
struct  guanaqo::noop_delete< T >
 Deleter for std::unique_ptr that just destructs the object, without deallocating. More...

Functions

template<class T>
T * guanaqo::start_lifetime_as_array (void *p, size_t n) noexcept
template<class T>
const T * guanaqo::start_lifetime_as_array (const void *p, size_t n) noexcept
template<class T>
T * guanaqo::start_lifetime_as (void *p) noexcept
template<class T>
const T * guanaqo::start_lifetime_as (const void *p) noexcept

Function Documentation

◆ start_lifetime_as_array() [1/2]

template<class T>
T * guanaqo::start_lifetime_as_array ( void * p,
size_t n )
noexcept

#include <guanaqo/lifetime.hpp>

Definition at line 29 of file lifetime.hpp.

Here is the caller graph for this function:

◆ start_lifetime_as_array() [2/2]

template<class T>
const T * guanaqo::start_lifetime_as_array ( const void * p,
size_t n )
noexcept

#include <guanaqo/lifetime.hpp>

Definition at line 38 of file lifetime.hpp.

◆ start_lifetime_as() [1/2]

template<class T>
T * guanaqo::start_lifetime_as ( void * p)
noexcept

#include <guanaqo/lifetime.hpp>

Definition at line 49 of file lifetime.hpp.

Here is the call graph for this function:

◆ start_lifetime_as() [2/2]

template<class T>
const T * guanaqo::start_lifetime_as ( const void * p)
noexcept

#include <guanaqo/lifetime.hpp>

Definition at line 55 of file lifetime.hpp.

Here is the call graph for this function: