15 static_assert(Capacity > 0,
"StaticVector capacity must be positive");
23 static_assert(std::is_trivially_destructible_v<T>,
24 "StaticVector stores elements eagerly and pop_back()/clear() only adjust "
25 "size; T must be trivially destructible");
26 static_assert(std::is_trivially_copyable_v<T>,
27 "StaticVector assigns into pre-constructed storage; T must be trivially "
30 constexpr std::size_t
size()
const
45 constexpr bool full()
const
47 return size_ == Capacity;
84 constexpr const T *
data()
const
95 std::array<T, Capacity> data_{};
96 std::size_t size_ = 0;
constexpr std::size_t size() const
constexpr ErrorCode push_back(const T &value)
constexpr std::size_t capacity() const
constexpr ErrorCode pop_back()
constexpr bool empty() const
constexpr const T & operator[](std::size_t index) const
constexpr T & operator[](std::size_t index)
constexpr const T * data() const
constexpr bool full() const