17#ifndef IOX_HOOFS_CXX_POOR_MANS_HEAP_HPP
18#define IOX_HOOFS_CXX_POOR_MANS_HEAP_HPP
29template <
typename Type>
113template <
typename Interface,
size_t TypeSize,
size_t TypeAlignment = 8>
123 template <
typename Type,
typename... CTorArgs>
135 template <
typename Type,
typename... CTorArgs>
147 Interface* operator->() const noexcept;
151 Interface& operator*() const noexcept;
154 Interface* m_instance{
nullptr};
155 alignas(TypeAlignment) uint8_t m_heap[TypeSize];
161#include "iceoryx_hoofs/internal/cxx/poor_mans_heap.inl"
This is a proxy which must be used for the non default PoorMansHeap ctor.
Definition: poor_mans_heap.hpp:31
Reserves space on stack for placement new instatiation.
Definition: poor_mans_heap.hpp:115
PoorMansHeap(PoorMansHeapType< Type >, CTorArgs &&... ctorArgs) noexcept
void deleteInstance() noexcept
Calls the destructor if there is a valid instance, otherwise nothing happens.
bool hasInstance() const noexcept
void newInstance(CTorArgs &&... ctorArgs) noexcept
building block to easily create free function for logging in a library context
Definition: lockfree_queue.hpp:29