15 #ifndef A_UTIL_UTIL_MEMORY_DETAIL_STACK_PTR_DECL_HEADER_INCLUDED
16 #define A_UTIL_UTIL_MEMORY_DETAIL_STACK_PTR_DECL_HEADER_INCLUDED
30 std::size_t StackSize =
sizeof(T),
31 std::size_t
Alignment =
alignof(std::size_t)>
88 const T* operator->()
const;
102 const T& operator*()
const;
108 explicit operator bool()
const noexcept;
118 template <
typename... Args>
119 void reset(Args&&... args);
137 StorageSize = StackSize + OverheadSize,
139 FirstFlagPosition = StackSize
144 InitializeStatus = FirstFlagPosition
164 const void* address()
const;
171 void setFlag(StackPtrFlagPositions position, StackPtrFlags flag);
177 bool isConstructed() const noexcept;
188 template <typename U, std::
size_t SSize, std::
size_t A>
193 std::array<
char, StorageSize> _storage;
206 template <typename T, std::
size_t StackSize, std::
size_t Alignment>
218 template <typename T, std::
size_t StackSize, std::
size_t Alignment>
232 template <typename T,
233 std::
size_t StackSize = sizeof(T),
234 std::
size_t Alignment = alignof(std::
size_t),
A smart pointer allocating its memory only on the stack.
StackPtrFlags
Flags for StackPtrFlagPositions.
StackPtrIntrospection
Calculate entire size of the _storage - adds padding bytes to comply to the alignment.
StackPtrFlagPositions
Absolute bit positions of the flags inside the overhead area of the storage.
void swap(StackPtr< T, StackSize, Alignment > &lhs, StackPtr< T, StackSize, Alignment > &rhs)
Swap storages of two objects of type StackPtr.
constexpr auto makeStackPtr(Args &&... args) -> StackPtr< T, StackSize, Alignment >
Create a new StackPtr.
Serves as the root component, with common functionality documented in core functionality.
A(8) B(8) G(8) R(8)") ADTF_DEFINE_STREAM_IMAGE_FORMAT(ARGB_32
Format definition this description means always first in lowest bit of lowest byte.
tResult reset(T &oCodec, const A_UTILS_NS::cString &strElementName)
Set the value of the requested element to zero.
Alignment
Alignment defintion.