Template Function wrench::allocate_intrusive_ptr

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 the allocator to allocate the data for the object. The type T must be a base of IntrsivePtrEnabled<T, Deleter> with a Deleter type which uses the given allocator to 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.