libhatchet
Loading...
Searching...
No Matches
hxptr.hpp File Reference

Go to the source code of this file.

Classes

class  hxptr< T, deleter_t_ >
class  hxkey_equal_t< hxptr< T, deleter_t_ > >
class  hxkey_hash_t< hxptr< T, deleter_t_ > >

Functions

template<typename T, typename deleter_t_ = hxdefault_delete, hxsystem_allocator_t allocator_ = hxsystem_allocator_current, hxalignment_t align_ = hxalignment, typename U_ = T>
hxptr< T, deleter_t_ > hxmake_ptr (const U_ &value_) noexcept

Detailed Description

A unique owning pointer.

Function Documentation

◆ hxmake_ptr()

template<typename T, typename deleter_t_ = hxdefault_delete, hxsystem_allocator_t allocator_ = hxsystem_allocator_current, hxalignment_t align_ = hxalignment, typename U_ = T>
hxptr< T, deleter_t_ > hxmake_ptr ( const U_ & value_)
noexcept

hxmake_ptr<T, deleter, allocator, align>(value) - Allocates and constructs an object of type T from value and returns it wrapped in an hxptr.

Will not return on failure.

  • deleter : The deleter type invoked on destruction. Defaults to hxdefault_delete.
  • allocator : The memory manager ID to use for allocation. Defaults to hxsystem_allocator_current.
  • align : Alignment to use when allocating. Defaults to hxalignment.
  • value : The value used to construct T.