16 #ifndef IOX_UTILS_CXX_POOR_MANS_HEAP_HPP
17 #define IOX_UTILS_CXX_POOR_MANS_HEAP_HPP
28 template <
typename Type>
112 template <
typename Interface,
size_t TypeSize,
size_t TypeAlignment = 8>
122 template <
typename Type,
typename... CTorArgs>
134 template <
typename Type,
typename... CTorArgs>
153 Interface* m_instance{
nullptr};
154 alignas(TypeAlignment) uint8_t m_heap[TypeSize];
160 #include "iceoryx_utils/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:30
Reserves space on stack for placement new instatiation.
Definition: poor_mans_heap.hpp:114
Interface & operator*() const noexcept
Definition: poor_mans_heap.inl:77
void deleteInstance() noexcept
Calls the destructor if there is a valid instance, otherwise nothing happens.
Definition: poor_mans_heap.inl:55
Interface * operator->() const noexcept
Definition: poor_mans_heap.inl:71
bool hasInstance() const noexcept
Definition: poor_mans_heap.inl:65
void newInstance(CTorArgs &&... ctorArgs) noexcept
Definition: poor_mans_heap.inl:44
building block to easily create free function for logging in a library context
Definition: lockfree_queue.hpp:28