emlabcpp
modern opinionated embedded C++ library
static_storage.h File Reference
#include <cstddef>
#include <memory>
#include <utility>
+ Include dependency graph for static_storage.h:

Go to the source code of this file.

Classes

struct  emlabcpp::static_storage< T, N >
 Continuous data container that can contain N of uninitialized elements. More...
 

Namespaces

 emlabcpp
 MIT License.
 

Typedefs

using emlabcpp::value_type = T
 
using emlabcpp::reference = T &
 
using emlabcpp::const_reference = T const &
 
using emlabcpp::pointer = T *
 
using emlabcpp::const_pointer = T const *
 
using emlabcpp::size_type = std::size_t
 

Functions

template<typename T , std::size_t N>
 emlabcpp::requires (trivial_for_static_storage< T >) struct static_storage< T
 
constexpr pointer emlabcpp::data () noexcept
 Returns pointer to first item of the storage. More...
 
template<typename... Args>
constexpr T & emlabcpp::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 emlabcpp::delete_item (size_type const i) noexcept(std::is_nothrow_destructible_v< T >)
 Deconstructs an item at position i. More...
 
constexpr reference emlabcpp::operator[] (size_type const i) noexcept
 Provides a reference to item at position i. More...
 

Variables

template<typename T >
concept emlabcpp::trivial_for_static_storage
 
 emlabcpp::N