ALib C++ Library
Library Version: 2412 R0
Documentation generated by doxygen
Loading...
Searching...
No Matches
AllocatorMember< HeapAllocator > Struct Reference

Description:

Specialization of this helper-struct for type HeapAllocator. Does not define a member and thus does not increase the footprint of a type that inherits this specialization.

Definition at line 688 of file allocation.hpp.

#include <allocation.hpp>

Collaboration diagram for AllocatorMember< HeapAllocator >:
[legend]

Public Static Field Index:

static constexpr HeapAllocator HEAP_ALLOCATOR_INSTANCE {}
 

Public Method Index:

 AllocatorMember ()=default
 Default Constructor.
 
 AllocatorMember (const HeapAllocator &heapAllocator) noexcept
 
AllocatorInterface< HeapAllocatorAI () const noexcept
 
HeapAllocatorGetAllocator () const noexcept
 

Field Details:

◆ HEAP_ALLOCATOR_INSTANCE

HeapAllocator HEAP_ALLOCATOR_INSTANCE {}
staticconstexpr

This is an empty instance of the empty heap allocation type.. It is used to receive a non-const reference with method GetAllocator.

Definition at line 692 of file allocation.hpp.

Constructor(s) / Destructor Details:

◆ AllocatorMember()

AllocatorMember ( const HeapAllocator & heapAllocator)
inlinenoexcept

Constructor.

Parameters
heapAllocatorThis parameter is ignored, as always HEAP_ALLOCATOR_INSTANCE is used.

Definition at line 699 of file allocation.hpp.

Method Details:

◆ AI()

AllocatorInterface< HeapAllocator > AI ( ) const
inlinenoexcept

This is a convenience operator which returns the AllocatorInterface for the stored allocator (by calling Allocator::operator()()).

Returns
The allocator interface of the stored allocator.

Definition at line 709 of file allocation.hpp.

◆ GetAllocator()

HeapAllocator & GetAllocator ( ) const
inlinenoexcept

Static implementation of interface function. (Optimized out.)

Returns
A reference to the 'fake' object defined with# HEAP_ALLOCATOR_INSTANCE.

Definition at line 703 of file allocation.hpp.


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