37#ifndef __ADS_interop_std_FlatMap
38 #define __ADS_interop_std_FlatMap
52#if defined( __cpp_lib_flat_map )
55#if defined( __cpp_lib_flat_set )
74 requires( std::random_access_iterator< typename S::iterator > &&
75 requires( S & s , std::size_t i ,
const typename S::value_type & x )
100 template< std::input_iterator I , std::sentinel_for< I > E >
112 const std::size_t i = rankOf( p );
119 template< std::input_iterator I , std::sentinel_for< I > E >
121 const std::size_t i0 = rankOf( p );
122 for( std::size_t i = i0 ; first != last ; ++first )
128 template<
class... A >
134 template<
class... A >
141 const std::size_t i = rankOf( p );
149 const std::size_t i = rankOf( first );
150 for( std::size_t k = rankOf( last ) - i ; k > 0 ; --k )
157 std::size_t rankOf( const_iterator p )
const {
158 return( std::size_t( p - cbegin() ) );
167#if defined( __cpp_lib_flat_set )
169template<
class K ,
class C = std::less< K > >
170using TieredFlatSet = std::flat_set< K , C , TieredVector< K > >;
173#if defined( __cpp_lib_flat_map )
175template<
class K ,
class V ,
class C = std::less< K > >
The tiered vector of Goodrich and Kloss, beyond the book: a sequence with access by index in time,...
iterator emplace(const_iterator p, A &&... a)
an item built from before the item of
Definition FlatMap.h:129
iterator erase(const_iterator first, const_iterator last)
the items of removed; an iterator on the item after them
Definition FlatMap.h:148
const_iterator cbegin(void) const
the constant iterator on the first item
Definition FlatMap.h:106
typename S::value_type value_type
the items
Definition FlatMap.h:84
reference emplace_back(A &&... a)
an item built from at the end
Definition FlatMap.h:135
StdSequence(void)=default
the empty sequence
std::size_t size_type
the sizes
Definition FlatMap.h:87
StdSequence(I first, E last)
the items of , in their order
Definition FlatMap.h:101
typename S::iterator iterator
the iterator
Definition FlatMap.h:89
iterator erase(const_iterator p)
the item of removed; an iterator on the item after it
Definition FlatMap.h:140
typename S::const_iterator const_iterator
the constant one
Definition FlatMap.h:90
std::ptrdiff_t difference_type
the distances
Definition FlatMap.h:88
const_iterator cend(void) const
the constant iterator past the last item
Definition FlatMap.h:108
iterator insert(const_iterator p, I first, E last)
the items of before the item of , in their order; an iterator on the first of them
Definition FlatMap.h:120
iterator insert(const_iterator p, const value_type &x)
before the item of ; an iterator on
Definition FlatMap.h:111
value_type & reference
a reference to an item
Definition FlatMap.h:85
const value_type & const_reference
to a constant item
Definition FlatMap.h:86
a sequence with access in and insertion and removal anywhere in , in circular blocks of items
Definition TieredVector.h:107