|
emlabcpp
modern opinionated embedded C++ library
|
Continuous data container that can contain N of uninitialized elements. More...
#include <static_storage.h>
Inheritance diagram for emlabcpp::static_storage< T, N >:
Collaboration diagram for emlabcpp::static_storage< T, N >: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 auto | copy_n (size_type const i, size_type const n, auto iter) noexcept(std::is_nothrow_copy_constructible_v< T >) |
Copies n items from iterator iter to storage starting at position i More... | |
| constexpr auto | move_n (size_type const i, size_type const n, auto iter) noexcept(std::is_nothrow_move_constructible_v< T >) |
Moves n items from iterator iter to storage starting at position i More... | |
| constexpr void | delete_n (size_type const i, size_type const n) noexcept(std::is_nothrow_destructible_v< T >) |
Deconstructs n items starting at position i. 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 |
Additional Inherited Members | |
Static Public Member Functions inherited from emlabcpp::static_storage_base | |
| template<typename F , typename T > | |
| static F | _copy_n (F first, std::size_t n, T *dest) |
| template<typename F , typename T > | |
| static F | _move_n (F first, std::size_t n, T *dest) |
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 |
Copies n items from iterator iter to storage starting at position i
References emlabcpp::static_storage_base::_copy_n(), and emlabcpp::static_storage< T, N >::data().
|
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 |
Deconstructs n items starting 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 |
Moves n items from iterator iter to storage starting at position i
References emlabcpp::static_storage_base::_move_n(), 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 |