scnlib  0.2.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
scn::detail::small_vector< T, StackN > Class Template Reference

#include <small_vector.h>

Inheritance diagram for scn::detail::small_vector< T, StackN >:
scn::detail::small_vector_base

Classes

struct  heap_storage
 
struct  stack_storage
 

Public Types

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

Public Member Functions

 small_vector () noexcept
 
 small_vector (size_type count, const T &value)
 
 small_vector (size_type count)
 
 small_vector (const small_vector &other)
 
 small_vector (small_vector &&other) noexcept
 
small_vectoroperator= (const small_vector &other)
 
small_vectoroperator= (small_vector &&other) noexcept
 
 ~small_vector ()
 
pointer data () noexcept
 
const_pointer data () const noexcept
 
size_type size () const noexcept
 
size_type capacity () const noexcept
 
bool empty () const noexcept
 
constexpr bool is_small () const noexcept
 
SCN_CONSTEXPR14 reference operator[] (size_type pos)
 
constexpr const_reference operator[] (size_type pos) const
 
SCN_CONSTEXPR14 reference front ()
 
constexpr const_reference front () const
 
SCN_CONSTEXPR14 reference back ()
 
constexpr const_reference back () const
 
SCN_CONSTEXPR14 iterator begin () noexcept
 
constexpr const_iterator begin () const noexcept
 
constexpr const_iterator cbegin () const noexcept
 
SCN_CONSTEXPR14 iterator end () noexcept
 
constexpr const_iterator end () const noexcept
 
constexpr const_iterator cend () const noexcept
 
SCN_CONSTEXPR14 reverse_iterator rbegin () noexcept
 
constexpr const_reverse_iterator rbegin () const noexcept
 
constexpr const_reverse_iterator crbegin () const noexcept
 
SCN_CONSTEXPR14 reverse_iterator rend () noexcept
 
constexpr const_reverse_iterator rend () const noexcept
 
constexpr const_reverse_iterator crend () const noexcept
 
constexpr size_type max_size () const noexcept
 
void make_small () noexcept
 
void reserve (size_type new_cap)
 
void shrink_to_fit ()
 
void clear () noexcept
 
iterator erase (iterator pos)
 
iterator erase (iterator b, iterator e)
 
void push_back (const T &value)
 
void push_back (T &&value)
 
template<typename... Args>
reference emplace_back (Args &&...args)
 
void pop_back ()
 
void resize (size_type count)
 
SCN_CONSTEXPR14 void swap (small_vector &other) noexcept
 

Static Public Member Functions

static constexpr bool can_be_small (size_type n) noexcept
 

Additional Inherited Members

- Protected Member Functions inherited from scn::detail::small_vector_base
size_t next_pow2 (size_t x)
 

Detailed Description

template<typename T, size_t StackN>
class scn::detail::small_vector< T, StackN >

Definition at line 292 of file small_vector.h.

Member Typedef Documentation

template<typename T, size_t StackN>
using scn::detail::small_vector< T, StackN >::const_iterator = const_pointer

Definition at line 302 of file small_vector.h.

template<typename T, size_t StackN>
using scn::detail::small_vector< T, StackN >::const_pointer = const T*

Definition at line 300 of file small_vector.h.

template<typename T, size_t StackN>
using scn::detail::small_vector< T, StackN >::const_reference = const T&

Definition at line 298 of file small_vector.h.

template<typename T, size_t StackN>
using scn::detail::small_vector< T, StackN >::const_reverse_iterator = std::reverse_iterator<const_pointer>

Definition at line 304 of file small_vector.h.

template<typename T, size_t StackN>
using scn::detail::small_vector< T, StackN >::difference_type = std::ptrdiff_t

Definition at line 296 of file small_vector.h.

template<typename T, size_t StackN>
using scn::detail::small_vector< T, StackN >::iterator = pointer

Definition at line 301 of file small_vector.h.

template<typename T, size_t StackN>
using scn::detail::small_vector< T, StackN >::pointer = T*

Definition at line 299 of file small_vector.h.

template<typename T, size_t StackN>
using scn::detail::small_vector< T, StackN >::reference = T&

Definition at line 297 of file small_vector.h.

template<typename T, size_t StackN>
using scn::detail::small_vector< T, StackN >::reverse_iterator = std::reverse_iterator<pointer>

Definition at line 303 of file small_vector.h.

template<typename T, size_t StackN>
using scn::detail::small_vector< T, StackN >::size_type = size_t

Definition at line 295 of file small_vector.h.

template<typename T, size_t StackN>
using scn::detail::small_vector< T, StackN >::value_type = T

Definition at line 294 of file small_vector.h.

Constructor & Destructor Documentation

template<typename T, size_t StackN>
scn::detail::small_vector< T, StackN >::small_vector ( )
inlinenoexcept

Definition at line 312 of file small_vector.h.

template<typename T, size_t StackN>
scn::detail::small_vector< T, StackN >::small_vector ( size_type  count,
const T &  value 
)
inlineexplicit

Definition at line 329 of file small_vector.h.

template<typename T, size_t StackN>
scn::detail::small_vector< T, StackN >::small_vector ( size_type  count)
inlineexplicit

Definition at line 358 of file small_vector.h.

template<typename T, size_t StackN>
scn::detail::small_vector< T, StackN >::small_vector ( const small_vector< T, StackN > &  other)
inline

Definition at line 386 of file small_vector.h.

template<typename T, size_t StackN>
scn::detail::small_vector< T, StackN >::small_vector ( small_vector< T, StackN > &&  other)
inlinenoexcept

Definition at line 423 of file small_vector.h.

template<typename T, size_t StackN>
scn::detail::small_vector< T, StackN >::~small_vector ( )
inline

Definition at line 537 of file small_vector.h.

Member Function Documentation

template<typename T, size_t StackN>
SCN_CONSTEXPR14 reference scn::detail::small_vector< T, StackN >::back ( )
inline

Definition at line 600 of file small_vector.h.

template<typename T, size_t StackN>
constexpr const_reference scn::detail::small_vector< T, StackN >::back ( ) const
inline

Definition at line 605 of file small_vector.h.

template<typename T, size_t StackN>
SCN_CONSTEXPR14 iterator scn::detail::small_vector< T, StackN >::begin ( )
inlinenoexcept

Definition at line 611 of file small_vector.h.

template<typename T, size_t StackN>
constexpr const_iterator scn::detail::small_vector< T, StackN >::begin ( ) const
inlinenoexcept

Definition at line 615 of file small_vector.h.

template<typename T, size_t StackN>
static constexpr bool scn::detail::small_vector< T, StackN >::can_be_small ( size_type  n)
inlinestaticnoexcept

Definition at line 573 of file small_vector.h.

template<typename T, size_t StackN>
size_type scn::detail::small_vector< T, StackN >::capacity ( ) const
inlinenoexcept

Definition at line 554 of file small_vector.h.

template<typename T, size_t StackN>
constexpr const_iterator scn::detail::small_vector< T, StackN >::cbegin ( ) const
inlinenoexcept

Definition at line 619 of file small_vector.h.

template<typename T, size_t StackN>
constexpr const_iterator scn::detail::small_vector< T, StackN >::cend ( ) const
inlinenoexcept

Definition at line 632 of file small_vector.h.

template<typename T, size_t StackN>
void scn::detail::small_vector< T, StackN >::clear ( )
inlinenoexcept

Definition at line 708 of file small_vector.h.

template<typename T, size_t StackN>
constexpr const_reverse_iterator scn::detail::small_vector< T, StackN >::crbegin ( ) const
inlinenoexcept

Definition at line 645 of file small_vector.h.

template<typename T, size_t StackN>
constexpr const_reverse_iterator scn::detail::small_vector< T, StackN >::crend ( ) const
inlinenoexcept

Definition at line 658 of file small_vector.h.

template<typename T, size_t StackN>
pointer scn::detail::small_vector< T, StackN >::data ( )
inlinenoexcept

Definition at line 542 of file small_vector.h.

template<typename T, size_t StackN>
const_pointer scn::detail::small_vector< T, StackN >::data ( ) const
inlinenoexcept

Definition at line 546 of file small_vector.h.

template<typename T, size_t StackN>
template<typename... Args>
reference scn::detail::small_vector< T, StackN >::emplace_back ( Args &&...  args)
inline

Definition at line 760 of file small_vector.h.

template<typename T, size_t StackN>
bool scn::detail::small_vector< T, StackN >::empty ( ) const
inlinenoexcept

Definition at line 562 of file small_vector.h.

template<typename T, size_t StackN>
SCN_CONSTEXPR14 iterator scn::detail::small_vector< T, StackN >::end ( )
inlinenoexcept

Definition at line 624 of file small_vector.h.

template<typename T, size_t StackN>
constexpr const_iterator scn::detail::small_vector< T, StackN >::end ( ) const
inlinenoexcept

Definition at line 628 of file small_vector.h.

template<typename T, size_t StackN>
iterator scn::detail::small_vector< T, StackN >::erase ( iterator  pos)
inline

Definition at line 713 of file small_vector.h.

template<typename T, size_t StackN>
iterator scn::detail::small_vector< T, StackN >::erase ( iterator  b,
iterator  e 
)
inline

Definition at line 731 of file small_vector.h.

template<typename T, size_t StackN>
SCN_CONSTEXPR14 reference scn::detail::small_vector< T, StackN >::front ( )
inline

Definition at line 589 of file small_vector.h.

template<typename T, size_t StackN>
constexpr const_reference scn::detail::small_vector< T, StackN >::front ( ) const
inline

Definition at line 594 of file small_vector.h.

template<typename T, size_t StackN>
constexpr bool scn::detail::small_vector< T, StackN >::is_small ( ) const
inlinenoexcept

Definition at line 567 of file small_vector.h.

template<typename T, size_t StackN>
void scn::detail::small_vector< T, StackN >::make_small ( )
inlinenoexcept

Definition at line 668 of file small_vector.h.

template<typename T, size_t StackN>
constexpr size_type scn::detail::small_vector< T, StackN >::max_size ( ) const
inlinenoexcept

Definition at line 663 of file small_vector.h.

template<typename T, size_t StackN>
small_vector& scn::detail::small_vector< T, StackN >::operator= ( const small_vector< T, StackN > &  other)
inline

Definition at line 453 of file small_vector.h.

template<typename T, size_t StackN>
small_vector& scn::detail::small_vector< T, StackN >::operator= ( small_vector< T, StackN > &&  other)
inlinenoexcept

Definition at line 494 of file small_vector.h.

template<typename T, size_t StackN>
SCN_CONSTEXPR14 reference scn::detail::small_vector< T, StackN >::operator[] ( size_type  pos)
inline

Definition at line 578 of file small_vector.h.

template<typename T, size_t StackN>
constexpr const_reference scn::detail::small_vector< T, StackN >::operator[] ( size_type  pos) const
inline

Definition at line 583 of file small_vector.h.

template<typename T, size_t StackN>
void scn::detail::small_vector< T, StackN >::pop_back ( )
inline

Definition at line 767 of file small_vector.h.

template<typename T, size_t StackN>
void scn::detail::small_vector< T, StackN >::push_back ( const T &  value)
inline

Definition at line 748 of file small_vector.h.

template<typename T, size_t StackN>
void scn::detail::small_vector< T, StackN >::push_back ( T &&  value)
inline

Definition at line 753 of file small_vector.h.

template<typename T, size_t StackN>
SCN_CONSTEXPR14 reverse_iterator scn::detail::small_vector< T, StackN >::rbegin ( )
inlinenoexcept

Definition at line 637 of file small_vector.h.

template<typename T, size_t StackN>
constexpr const_reverse_iterator scn::detail::small_vector< T, StackN >::rbegin ( ) const
inlinenoexcept

Definition at line 641 of file small_vector.h.

template<typename T, size_t StackN>
SCN_CONSTEXPR14 reverse_iterator scn::detail::small_vector< T, StackN >::rend ( )
inlinenoexcept

Definition at line 650 of file small_vector.h.

template<typename T, size_t StackN>
constexpr const_reverse_iterator scn::detail::small_vector< T, StackN >::rend ( ) const
inlinenoexcept

Definition at line 654 of file small_vector.h.

template<typename T, size_t StackN>
void scn::detail::small_vector< T, StackN >::reserve ( size_type  new_cap)
inline

Definition at line 687 of file small_vector.h.

template<typename T, size_t StackN>
void scn::detail::small_vector< T, StackN >::resize ( size_type  count)
inline

Definition at line 773 of file small_vector.h.

template<typename T, size_t StackN>
void scn::detail::small_vector< T, StackN >::shrink_to_fit ( )
inline

Definition at line 695 of file small_vector.h.

template<typename T, size_t StackN>
size_type scn::detail::small_vector< T, StackN >::size ( ) const
inlinenoexcept

Definition at line 550 of file small_vector.h.

template<typename T, size_t StackN>
SCN_CONSTEXPR14 void scn::detail::small_vector< T, StackN >::swap ( small_vector< T, StackN > &  other)
inlinenoexcept

Definition at line 790 of file small_vector.h.

Member Data Documentation

template<typename T, size_t StackN>
heap_storage scn::detail::small_vector< T, StackN >::m_heap_storage

Definition at line 893 of file small_vector.h.

template<typename T, size_t StackN>
stack_storage scn::detail::small_vector< T, StackN >::m_stack_storage

Definition at line 892 of file small_vector.h.


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