14 #include <type_traits> 23 operator const bool&()
const {
return b; }
24 operator bool&() {
return b; }
36 template <
typename VAL,
size_t small_size,
size_t alignment = 16>
40 using T = std::conditional_t<
98 m_v = std::move(o.m_v);
100 m_a = std::move(o.m_a);
104 template <
typename TYPE,
typename POINTER,
typename REFERENCE>
107 using STORAGE = std::conditional_t<
110 std::is_same_v<POINTER, const bool*>,
168 return m_ptr - o.m_ptr;
194 std::copy(
m_v.begin(),
m_v.begin() + n,
m_a.begin());
210 m_v.assign(
m_v.size(), v);
~vector_with_small_size_optimization()=default
self operator-=(difference_type n)
typename large_vec::difference_type difference_type
std::vector< T, ALLOC > large_vec
iteratorImpl< NUMTYPE, const NUMTYPE *, const NUMTYPE &> const_iterator
Container that transparently and dynamically switches between a std::array and std::vector.
const_iterator end() const noexcept
std::random_access_iterator_tag iterator_category
std::conditional_t< std::is_same_v< POINTER, bool * >, internal::UnspecializedBool *, std::conditional_t< std::is_same_v< POINTER, const bool * >, const internal::UnspecializedBool *, POINTER > > STORAGE
vector_with_small_size_optimization(const vector_with_small_size_optimization &o)
std::conditional_t< std::is_same_v< VAL, bool >, internal::UnspecializedBool, VAL > T
reference operator[](size_type n)
iteratorImpl(STORAGE ptr)
self operator+=(difference_type n)
iterator begin() noexcept
const POINTER operator->() const
typename large_vec::size_type size_type
const T & const_reference
Aligned allocator that is compatible with C++11.
typename large_vec::difference_type difference_type
vector_with_small_size_optimization(size_t n)
vector_with_small_size_optimization & operator=(vector_with_small_size_optimization &&o)
self operator-(difference_type n)
vector_with_small_size_optimization & operator=(const vector_with_small_size_optimization &o)
vector_with_small_size_optimization(vector_with_small_size_optimization &&o)
const_iterator begin() const noexcept
bool operator!=(const self &o)
const_reference operator[](size_type n) const
std::array< T, small_size > small_array
self operator+(difference_type n)
const_reference front() const
bool operator==(const self &o)
const_reference back() const
difference_type operator-(const self &o) const
const REFERENCE operator*() const
iteratorImpl< NUMTYPE, NUMTYPE *, NUMTYPE &> iterator
vector_with_small_size_optimization()=default