Template Function wrench::allocate_intrusive_ptr¶
Defined in File intrusive_ptr.hpp
Function Documentation¶
-
template<typename T, typename Allocator, typename... Args> auto wrench::allocate_intrusive_ptr (Allocator &allocator, Args &&... args) -> IntrusivePtr< T > Creates an
IntrusivePtr<T>, using theallocatorto allocate the data for the object. The type T must be a base of IntrsivePtrEnabled<T, Deleter> with a Deleter type which uses the givenallocatorto destroy the data.The allocator must have an
alloc(size, alignment)method.- Parameters
allocator: The allocator to allocate the data with.args: The arguments for the construction of the pointer.
- Template Parameters
T: The type of the intrusive pointed to type.Args: The type of the args.