memory
Classes | Functions
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...
 
class  unique_base_ptr< BaseType, RawAllocator >
 A std::unique_ptr that deletes using a RawAllocator and allows polymorphic types. More...
 

Functions

template<typename T , class RawAllocator , typename... Args>
auto allocate_unique (allocator_reference< RawAllocator > alloc, Args &&... args) -> std::unique_ptr< T, allocator_deleter< T, RawAllocator > >
 
template<typename T , typename... Args>
void construct (std::true_type, T *cur, T *end, Args &&... args)
 
template<typename T , typename... Args>
void construct (std::false_type, T *begin, T *end, Args &&... args)
 
template<typename T , class RawAllocator >
auto allocate_array_unique (std::size_t size, allocator_reference< RawAllocator > alloc) -> std::unique_ptr< T[], allocator_deleter< T[], RawAllocator > >
 
template<typename T , class RawAllocator , typename... Args>
auto allocate_unique (RawAllocator &&alloc, Args &&... args) ->
 Creates a std::unique_ptr using a RawAllocator for the allocation.
 
template<typename T , class RawAllocator , typename... Args>
auto allocate_unique (any_allocator, RawAllocator &&alloc, Args &&... args) ->
 Creates a std::unique_ptr using a type-erased RawAllocator for the allocation.
 
template<typename T , class RawAllocator >
auto allocate_unique (RawAllocator &&alloc, std::size_t size) ->
 Creates a std::unique_ptr owning an array using a RawAllocator for the allocation.
 
template<typename T , class RawAllocator >
auto allocate_unique (any_allocator, RawAllocator &&alloc, std::size_t size) ->
 Creates a std::unique_ptr owning an array using a type-erased RawAllocator for the allocation.
 
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.