sandbox
Loading...
Searching...
No Matches
sbx::memory::static_vector< Type, Capacity > Class Template Reference

static_vector implementation inspired by https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p0843r2.html More...

#include <static_vector.hpp>

Public Types

using value_type = Type
 
using reference = value_type &
 
using const_reference = const value_type &
 
using pointer = value_type *
 
using const_pointer = const value_type *
 
using size_type = std::size_t
 
using iterator = pointer
 
using const_iterator = const_pointer
 

Public Member Functions

 static_vector (const static_vector &other) noexcept
 
 static_vector (static_vector &&other) noexcept
 
auto operator= (static_vector other) noexcept -> static_vector &
 
auto size () const noexcept -> size_type
 
auto capacity () const noexcept -> size_type
 
auto is_empty () const noexcept -> bool
 
auto is_full () const noexcept -> bool
 
auto begin () noexcept -> iterator
 
auto begin () const noexcept -> const_iterator
 
auto cbegin () const noexcept -> const_iterator
 
auto end () noexcept -> iterator
 
auto end () const noexcept -> const_iterator
 
auto cend () const noexcept -> const_iterator
 
auto front () noexcept -> reference
 
auto front () const noexcept -> const_reference
 
auto back () noexcept -> reference
 
auto back () const noexcept -> const_reference
 
auto operator[] (const size_type index) noexcept -> reference
 
auto operator[] (const size_type index) const noexcept -> const_reference
 
auto at (const size_type index) -> reference
 
auto at (const size_type index) const -> const_reference
 
auto data () noexcept -> pointer
 
auto data () const noexcept -> const_pointer
 
auto push_back (const value_type &value) noexcept -> void
 
auto push_back (value_type &&value) noexcept -> void
 
template<typename... Args>
requires (std::is_constructible_v<Type, Args...>)
auto emplace_back (Args &&... args) noexcept -> void
 
auto pop_back () noexcept -> void
 
auto clear () noexcept -> void
 
auto swap (static_vector &other) -> void
 

Detailed Description

template<typename Type, std::size_t Capacity>
class sbx::memory::static_vector< Type, Capacity >

static_vector implementation inspired by https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p0843r2.html

Template Parameters
Type
Capacity

The documentation for this class was generated from the following file: