EnTT 3.13.0
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
entt::allocation_deleter< Allocator > Struct Template Reference

Deleter for allocator-aware unique pointers (waiting for C++20). More...

#include <memory.hpp>

Inheritance diagram for entt::allocation_deleter< Allocator >:
Inheritance graph
[legend]
Collaboration diagram for entt::allocation_deleter< Allocator >:
Collaboration graph
[legend]

Public Types

using allocator_type = Allocator
 Allocator type.
 
using pointer = typename std::allocator_traits< Allocator >::pointer
 Pointer type.
 

Public Member Functions

constexpr allocation_deleter (const allocator_type &alloc) noexcept(std::is_nothrow_copy_constructible_v< allocator_type >)
 Inherited constructors.
 
constexpr void operator() (pointer ptr) noexcept(std::is_nothrow_destructible_v< typename allocator_type::value_type >)
 Destroys the pointed object and deallocates its memory.
 

Detailed Description

template<typename Allocator>
struct entt::allocation_deleter< Allocator >

Deleter for allocator-aware unique pointers (waiting for C++20).

Template Parameters
AllocatorType of allocator used to manage memory and elements.

Definition at line 114 of file memory.hpp.

Member Typedef Documentation

◆ allocator_type

template<typename Allocator >
using entt::allocation_deleter< Allocator >::allocator_type = Allocator

Allocator type.

Definition at line 116 of file memory.hpp.

◆ pointer

template<typename Allocator >
using entt::allocation_deleter< Allocator >::pointer = typename std::allocator_traits<Allocator>::pointer

Pointer type.

Definition at line 118 of file memory.hpp.

Constructor & Destructor Documentation

◆ allocation_deleter()

template<typename Allocator >
constexpr entt::allocation_deleter< Allocator >::allocation_deleter ( const allocator_type alloc)
inlineconstexprnoexcept

Inherited constructors.

Parameters
allocThe allocator to use.

Definition at line 124 of file memory.hpp.

Member Function Documentation

◆ operator()()

template<typename Allocator >
constexpr void entt::allocation_deleter< Allocator >::operator() ( pointer  ptr)
inlineconstexprnoexcept

Destroys the pointed object and deallocates its memory.

Parameters
ptrA valid pointer to an object of the given type.

Definition at line 131 of file memory.hpp.


The documentation for this struct was generated from the following file: