|
|
auto | as_span () const noexcept -> std::span< const T > |
|
auto | as_span () noexcept -> std::span< T > |
| | Non-owning view over the live elements.
|
|
auto | back () const noexcept -> const T & |
|
auto | back () noexcept -> T & |
|
auto | begin () const noexcept -> const_iterator |
|
auto | begin () noexcept -> iterator |
|
constexpr auto | capacity () const noexcept -> usize |
| | Maximum number of elements.
|
|
auto | clear () noexcept -> void |
| | Destroy all elements; size becomes 0.
|
|
auto | data () const noexcept -> const T * |
|
auto | data () noexcept -> T * |
|
template<typename... Args> |
| auto | emplace_back (Args &&... args) noexcept -> std::expected< T *, lib::kernel_error > |
| | Construct element in-place at the end.
|
|
constexpr auto | empty () const noexcept -> bool |
| | True when size() == 0.
|
|
auto | end () const noexcept -> const_iterator |
|
auto | end () noexcept -> iterator |
|
auto | front () const noexcept -> const T & |
|
auto | front () noexcept -> T & |
|
constexpr auto | full () const noexcept -> bool |
| | True when size() == capacity().
|
|
auto | operator= (const static_vector &o) noexcept -> static_vector & |
|
auto | operator= (static_vector &&o) noexcept -> static_vector & |
|
auto | operator[] (usize i) const noexcept -> const T & |
|
auto | operator[] (usize i) noexcept -> T & |
| auto | pop_back () noexcept -> void |
| | Remove and destroy the last element.
|
| auto | push_back (const T &val) noexcept -> std::expected< void, lib::kernel_error > |
| | Append a copy of val.
|
|
auto | push_back (T &&val) noexcept -> std::expected< void, lib::kernel_error > |
| | Append by moving val.
|
| auto | push_back_unchecked (const T &val) noexcept -> void |
| | Unchecked push — caller guarantees !full().
|
|
auto | push_back_unchecked (T &&val) noexcept -> void |
|
constexpr auto | size () const noexcept -> usize |
| | Number of live elements.
|
|
constexpr | static_vector () noexcept=default |
| | Default constructor — empty vector.
|
|
| static_vector (const static_vector &o) |
| | Copy constructor.
|
|
| static_vector (static_vector &&o) |
| | Move constructor.
|
|
| ~static_vector () noexcept |
| | Destructor — destroys all live elements.
|
template<typename T, usize N>
class lib::static_vector< T, N >
A contiguous sequence of up to N elements stored entirely.
- Template Parameters
-
| T | Element type. |
| N | Maximum number of elements. |