openMSX
Public Types | Public Member Functions | List of all members
static_vector< T, N > Class Template Reference

#include <static_vector.hh>

Inheritance diagram for static_vector< T, N >:
Inheritance graph
[legend]

Public Types

using value_type = T
 
using reference = value_type &
 
using const_reference = const value_type &
 
using iterator = value_type *
 
using const_iterator = const value_type *
 
using pointer = value_type *
 
using const_pointer = const value_type *
 
using size_type = size_t
 
using difference_type = ptrdiff_t
 
using reverse_iterator = std::reverse_iterator< iterator >
 
using const_reverse_iterator = std::reverse_iterator< const_iterator >
 

Public Member Functions

constexpr static_vector ()=default
 
constexpr static_vector (std::initializer_list< T > list)
 
template<typename Range >
constexpr static_vector (from_range_t, Range &&range)
 
constexpr auto begin () noexcept
 
constexpr auto begin () const noexcept
 
constexpr auto end () noexcept
 
constexpr auto end () const noexcept
 
constexpr auto rbegin () noexcept
 
constexpr auto rbegin () const noexcept
 
constexpr auto rend () noexcept
 
constexpr auto rend () const noexcept
 
constexpr size_t size () const noexcept
 
constexpr size_t max_size () const noexcept
 
constexpr bool empty () const noexcept
 
constexpr T & operator[] (size_t index) noexcept
 
constexpr const T & operator[] (size_t index) const noexcept
 
constexpr T & front () noexcept
 
constexpr const T & front () const noexcept
 
constexpr T & back () noexcept
 
constexpr const T & back () const noexcept
 
constexpr T * data () noexcept
 
constexpr const T * data () const noexcept
 
constexpr void push_back (const T &a)
 
constexpr void push_back (T &&a)
 
constexpr void pop_back () noexcept
 
constexpr void clear () noexcept
 
 operator std::span< T > () noexcept
 
 operator std::span< const T > () const noexcept
 

Detailed Description

template<typename T, size_t N>
class static_vector< T, N >

Definition at line 32 of file static_vector.hh.

Member Typedef Documentation

◆ const_iterator

template<typename T , size_t N>
using static_vector< T, N >::const_iterator = const value_type*

Definition at line 45 of file static_vector.hh.

◆ const_pointer

template<typename T , size_t N>
using static_vector< T, N >::const_pointer = const value_type*

Definition at line 47 of file static_vector.hh.

◆ const_reference

template<typename T , size_t N>
using static_vector< T, N >::const_reference = const value_type&

Definition at line 43 of file static_vector.hh.

◆ const_reverse_iterator

template<typename T , size_t N>
using static_vector< T, N >::const_reverse_iterator = std::reverse_iterator<const_iterator>

Definition at line 51 of file static_vector.hh.

◆ difference_type

template<typename T , size_t N>
using static_vector< T, N >::difference_type = ptrdiff_t

Definition at line 49 of file static_vector.hh.

◆ iterator

template<typename T , size_t N>
using static_vector< T, N >::iterator = value_type*

Definition at line 44 of file static_vector.hh.

◆ pointer

template<typename T , size_t N>
using static_vector< T, N >::pointer = value_type*

Definition at line 46 of file static_vector.hh.

◆ reference

template<typename T , size_t N>
using static_vector< T, N >::reference = value_type&

Definition at line 42 of file static_vector.hh.

◆ reverse_iterator

template<typename T , size_t N>
using static_vector< T, N >::reverse_iterator = std::reverse_iterator<iterator>

Definition at line 50 of file static_vector.hh.

◆ size_type

template<typename T , size_t N>
using static_vector< T, N >::size_type = size_t

Definition at line 48 of file static_vector.hh.

◆ value_type

template<typename T , size_t N>
using static_vector< T, N >::value_type = T

Definition at line 41 of file static_vector.hh.

Constructor & Destructor Documentation

◆ static_vector() [1/3]

template<typename T , size_t N>
constexpr static_vector< T, N >::static_vector ( )
constexprdefault

◆ static_vector() [2/3]

template<typename T , size_t N>
constexpr static_vector< T, N >::static_vector ( std::initializer_list< T >  list)
inlineconstexpr

Definition at line 55 of file static_vector.hh.

References ranges::copy().

◆ static_vector() [3/3]

template<typename T , size_t N>
template<typename Range >
constexpr static_vector< T, N >::static_vector ( from_range_t  ,
Range &&  range 
)
inlineconstexpr

Definition at line 62 of file static_vector.hh.

References static_vector< T, N >::push_back().

Member Function Documentation

◆ back() [1/2]

template<typename T , size_t N>
constexpr const T & static_vector< T, N >::back ( ) const
inlineconstexprnoexcept

Definition at line 86 of file static_vector.hh.

◆ back() [2/2]

template<typename T , size_t N>
constexpr T & static_vector< T, N >::back ( )
inlineconstexprnoexcept

Definition at line 85 of file static_vector.hh.

◆ begin() [1/2]

template<typename T , size_t N>
constexpr auto static_vector< T, N >::begin ( ) const
inlineconstexprnoexcept

Definition at line 69 of file static_vector.hh.

◆ begin() [2/2]

template<typename T , size_t N>
constexpr auto static_vector< T, N >::begin ( )
inlineconstexprnoexcept

Definition at line 68 of file static_vector.hh.

Referenced by static_vector< T, N >::rend(), and static_vector< T, N >::rend().

◆ clear()

template<typename T , size_t N>
constexpr void static_vector< T, N >::clear ( )
inlineconstexprnoexcept

Definition at line 93 of file static_vector.hh.

Referenced by PerfectMinimalHash::create().

◆ data() [1/2]

template<typename T , size_t N>
constexpr const T * static_vector< T, N >::data ( ) const
inlineconstexprnoexcept

Definition at line 88 of file static_vector.hh.

◆ data() [2/2]

template<typename T , size_t N>
constexpr T * static_vector< T, N >::data ( )
inlineconstexprnoexcept

Definition at line 87 of file static_vector.hh.

◆ empty()

template<typename T , size_t N>
constexpr bool static_vector< T, N >::empty ( ) const
inlineconstexprnoexcept

Definition at line 79 of file static_vector.hh.

◆ end() [1/2]

template<typename T , size_t N>
constexpr auto static_vector< T, N >::end ( ) const
inlineconstexprnoexcept

Definition at line 71 of file static_vector.hh.

◆ end() [2/2]

template<typename T , size_t N>
constexpr auto static_vector< T, N >::end ( )
inlineconstexprnoexcept

◆ front() [1/2]

template<typename T , size_t N>
constexpr const T & static_vector< T, N >::front ( ) const
inlineconstexprnoexcept

Definition at line 84 of file static_vector.hh.

◆ front() [2/2]

template<typename T , size_t N>
constexpr T & static_vector< T, N >::front ( )
inlineconstexprnoexcept

Definition at line 83 of file static_vector.hh.

◆ max_size()

template<typename T , size_t N>
constexpr size_t static_vector< T, N >::max_size ( ) const
inlineconstexprnoexcept

Definition at line 78 of file static_vector.hh.

◆ operator std::span< const T >()

template<typename T , size_t N>
static_vector< T, N >::operator std::span< const T > ( ) const
inlinenoexcept

Definition at line 96 of file static_vector.hh.

◆ operator std::span< T >()

template<typename T , size_t N>
static_vector< T, N >::operator std::span< T > ( )
inlinenoexcept

Definition at line 95 of file static_vector.hh.

◆ operator[]() [1/2]

template<typename T , size_t N>
constexpr const T & static_vector< T, N >::operator[] ( size_t  index) const
inlineconstexprnoexcept

Definition at line 82 of file static_vector.hh.

◆ operator[]() [2/2]

template<typename T , size_t N>
constexpr T & static_vector< T, N >::operator[] ( size_t  index)
inlineconstexprnoexcept

Definition at line 81 of file static_vector.hh.

◆ pop_back()

template<typename T , size_t N>
constexpr void static_vector< T, N >::pop_back ( )
inlineconstexprnoexcept

Definition at line 92 of file static_vector.hh.

◆ push_back() [1/2]

template<typename T , size_t N>
constexpr void static_vector< T, N >::push_back ( const T &  a)
inlineconstexpr

◆ push_back() [2/2]

template<typename T , size_t N>
constexpr void static_vector< T, N >::push_back ( T &&  a)
inlineconstexpr

Definition at line 91 of file static_vector.hh.

◆ rbegin() [1/2]

template<typename T , size_t N>
constexpr auto static_vector< T, N >::rbegin ( ) const
inlineconstexprnoexcept

Definition at line 73 of file static_vector.hh.

References static_vector< T, N >::end().

◆ rbegin() [2/2]

template<typename T , size_t N>
constexpr auto static_vector< T, N >::rbegin ( )
inlineconstexprnoexcept

Definition at line 72 of file static_vector.hh.

References static_vector< T, N >::end().

◆ rend() [1/2]

template<typename T , size_t N>
constexpr auto static_vector< T, N >::rend ( ) const
inlineconstexprnoexcept

Definition at line 75 of file static_vector.hh.

References static_vector< T, N >::begin().

◆ rend() [2/2]

template<typename T , size_t N>
constexpr auto static_vector< T, N >::rend ( )
inlineconstexprnoexcept

Definition at line 74 of file static_vector.hh.

References static_vector< T, N >::begin().

◆ size()

template<typename T , size_t N>
constexpr size_t static_vector< T, N >::size ( ) const
inlineconstexprnoexcept

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