emlabcpp
modern opinionated embedded C++ library
|
Continuous data container that can contain N of uninitialized elements. More...
#include <static_storage.h>
Public Types | |
using | value_type = T |
using | reference = T & |
using | const_reference = T const & |
using | pointer = T * |
using | const_pointer = T const * |
using | size_type = std::size_t |
Public Member Functions | |
constexpr pointer | data () noexcept |
Returns pointer to first item of the storage. More... | |
constexpr const_pointer | data () const noexcept |
Returns pointer to first item of the storage. More... | |
template<typename... Args> | |
constexpr T & | emplace_item (size_type const i, Args &&... args) noexcept(std::is_nothrow_constructible_v< T, Args... >) |
Constructs an item at position i with arguments args... More... | |
constexpr void | delete_item (size_type const i) noexcept(std::is_nothrow_destructible_v< T >) |
Deconstructs an item at position i. More... | |
constexpr reference | operator[] (size_type const i) noexcept |
Provides a reference to item at position i. More... | |
constexpr const_reference | operator[] (size_type const i) const noexcept |
Provides a reference to item at position i. More... | |
Static Public Attributes | |
static constexpr std::size_t | capacity = N |
Continuous data container that can contain N of uninitialized elements.
Bookkeeping (what item is initialized and what is not) is up to owner of this structure.
using emlabcpp::static_storage< T, N >::const_pointer = T const* |
using emlabcpp::static_storage< T, N >::const_reference = T const& |
using emlabcpp::static_storage< T, N >::pointer = T* |
using emlabcpp::static_storage< T, N >::reference = T& |
using emlabcpp::static_storage< T, N >::size_type = std::size_t |
using emlabcpp::static_storage< T, N >::value_type = T |
|
inlineconstexprnoexcept |
Returns pointer to first item of the storage.
|
inlineconstexprnoexcept |
Returns pointer to first item of the storage.
|
inlineconstexprnoexcept |
Deconstructs an item at position i.
References emlabcpp::static_storage< T, N >::data().
|
inlineconstexprnoexcept |
Constructs an item at position i with arguments args...
References emlabcpp::args, and emlabcpp::static_storage< T, N >::data().
|
inlineconstexprnoexcept |
Provides a reference to item at position i.
References emlabcpp::static_storage< T, N >::data().
|
inlineconstexprnoexcept |
Provides a reference to item at position i.
References emlabcpp::static_storage< T, N >::data().
|
staticconstexpr |