µOS++ IIIe Reference 7.0.0
The third edition of µOS++, a POSIX inspired open source framework, written in C++
Loading...
Searching...
No Matches
os::rtos::memory::allocator_deleter< A > Class Template Reference

Allocator deleter. More...

#include <os-memory.h>

Public Types

using allocator_traits = std::allocator_traits< A >
 Standard allocator traits definition.
 
using allocator_type = A
 Standard allocator type definition.
 
using pointer = typename allocator_traits::pointer
 

Public Member Functions

Constructors & Destructor
 allocator_deleter ()
 Default constructor.
 
 allocator_deleter (const allocator_type &other)
 Copy constructor.
 
 allocator_deleter (allocator_deleter &&other)=default
 Move constructor.
 
 ~allocator_deleter ()=default
 Destruct the allocator deleter.
 
Operators
allocator_deleteroperator= (const allocator_deleter &other)=default
 Copy assignment operator.
 
allocator_deleteroperator= (allocator_deleter &&other)=default
 Move assignment operator.
 
void operator() (pointer addr) const
 

Detailed Description

template<typename A>
class os::rtos::memory::allocator_deleter< A >

Allocator deleter.

Template Parameters
AAllocator type.

This class acts as a function to be used as deleter by smart pointers, like unique_ptr<>.

It refers to the allocator to destruct and deallocate the object.

Definition at line 849 of file os-memory.h.

Member Typedef Documentation

◆ allocator_traits

template<typename A >
using os::rtos::memory::allocator_deleter< A >::allocator_traits = std::allocator_traits<A>

Standard allocator traits definition.

Definition at line 861 of file os-memory.h.

◆ allocator_type

template<typename A >
using os::rtos::memory::allocator_deleter< A >::allocator_type = A

Standard allocator type definition.

Definition at line 856 of file os-memory.h.

◆ pointer

template<typename A >
using os::rtos::memory::allocator_deleter< A >::pointer = typename allocator_traits::pointer

Definition at line 863 of file os-memory.h.

Constructor & Destructor Documentation

◆ allocator_deleter() [1/3]

template<typename A >
os::rtos::memory::allocator_deleter< A >::allocator_deleter ( )

Default constructor.

◆ allocator_deleter() [2/3]

template<typename A >
os::rtos::memory::allocator_deleter< A >::allocator_deleter ( const allocator_type other)

Copy constructor.

Parameters
otherReference to allocator.

◆ allocator_deleter() [3/3]

template<typename A >
os::rtos::memory::allocator_deleter< A >::allocator_deleter ( allocator_deleter< A > &&  other)
default

Move constructor.

Parameters
otherReference to existing allocator.

◆ ~allocator_deleter()

template<typename A >
os::rtos::memory::allocator_deleter< A >::~allocator_deleter ( )
default

Destruct the allocator deleter.

Member Function Documentation

◆ operator()()

template<typename A >
void os::rtos::memory::allocator_deleter< A >::operator() ( pointer  addr) const

◆ operator=() [1/2]

template<typename A >
allocator_deleter & os::rtos::memory::allocator_deleter< A >::operator= ( allocator_deleter< A > &&  other)
default

Move assignment operator.

Parameters
otherReference to existing allocator.
Returns
Reference to allocator.

◆ operator=() [2/2]

template<typename A >
allocator_deleter & os::rtos::memory::allocator_deleter< A >::operator= ( const allocator_deleter< A > &  other)
default

Copy assignment operator.

Parameters
otherReference to existing allocator.
Returns
Reference to allocator.

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