Documentation of memory

( foonathan/memory)

smart_ptr.hpp File Reference

Detailed Description

std::make_unique() / std::make_shared() replacement allocating memory through a RawAllocator.

Note
Only available on a hosted implementation.

Classes

class  unique_ptr< T, RawAllocator >
 A std::unique_ptr that deletes using a RawAllocator. More...
 
struct  shared_ptr_node_size< T >
 Contains the node size needed for a std::shared_ptr. More...
 

Functions

template<typename T , class RawAllocator , typename... Args>
auto allocate_unique (RawAllocator &&alloc, Args &&... args) -> allocator_deleter< T, typename std::decay< RawAllocator >::type >>)
 Creates a std::unique_ptr using a RawAllocator for the allocation. More...
 
template<typename T , class RawAllocator , typename... Args>
auto allocate_unique (any_allocator, RawAllocator &&alloc, Args &&... args) -> allocator_deleter< T, any_allocator >>)
 Creates a std::unique_ptr using a type-erased RawAllocator for the allocation. More...
 
template<typename T , class RawAllocator >
auto allocate_unique (RawAllocator &&alloc, std::size_t size) -> allocator_deleter< T, typename std::decay< RawAllocator >::type >>)
 Creates a std::unique_ptr owning an array using a RawAllocator for the allocation. More...
 
template<typename T , class RawAllocator >
auto allocate_unique (any_allocator, RawAllocator &&alloc, std::size_t size) -> allocator_deleter< T, any_allocator >>)
 Creates a std::unique_ptr owning an array using a type-erased RawAllocator for the allocation. More...
 
template<typename T , class RawAllocator , typename... Args>
std::shared_ptr< T > allocate_shared (RawAllocator &&alloc, Args &&... args)
 Creates a std::shared_ptr using a RawAllocator for the allocation. More...