16 template <
typename Dereference =
as_tuple,
typename... Maps>
23 template <std::size_t... I>
61 = std::tuple<const typename remove_reference_t<Maps>::mapped_type&...>;
130 if (std::get<0>(is_) == std::get<0>(ends_))
138 if (is_done_ || k == k2)
148 template <std::size_t... I>
151 using swallow =
int[];
152 (
void) swallow{ (!is_done_ && (k = align_<I>(k),
false))... };
158 template <std::
size_t I>
162 auto& first = std::get<I>(
is_);
166 while (first != std::get<I>(ends_)
167 && std::get<I>(zip_.
maps_).key_comp()(first->first, k))
169 if (first == std::get<I>(ends_))
178 template <std::size_t... I>
181 for (
auto n: {(std::get<I>(
is_) != std::get<I>(that.
is_))...})
190 return std::get<0>(
is_)->first;
194 template <std::size_t... I>
203 template <std::size_t... I>
229 template <std::size_t... I>
237 template <std::size_t... I>
248 template <
typename Dereference =
as_pair,
typename... Maps>
252 return {std::forward<Maps>(maps)...};
255 template <
typename Dereference =
as_pair,
typename... Maps>
key_t align_(key_t k)
Given the current candidate key, try to find the proper range for I.
bool not_equal_(const iterator &that, seq< I...>) const
zipped_maps & zip_
The maps etc.
zipped_maps(const maps_t &maps)
auto dereference_(as_tuple) -> references_t
Return as <, , ...>.
std::istringstream is
The input stream: the specification to translate.
typename std::remove_const< T >::type remove_const_t
iterator begin_(seq< I...>)
auto dereference_(as_pair) -> std::pair< key_t, mapped_t >
Return as >.
std::tuple< const value_t< Maps > &...> references_t
void align_()
Align all iterators on the first common key.
void done_()
We have reached the end, move all the cursors to this end.
ValueSet::value_t tuple(const ValueSet &vs, const typename ValueSets::value_t &...v)
zipped_maps< Dereference, Maps...> zip_maps(Maps &&...maps)
mapped_t dereference_second_(seq< I...>) const
The associated tuple of values.
references_t dereference_(seq< I...>) const
Tuple of pairs.
std::tuple< const typename remove_reference_t< Maps >::mapped_type &...> mapped_t
Tuple of mapped types.
bool operator!=(const iterator &that) const
typename std::remove_reference< T >::type remove_reference_t
remove_const_t< typename tuple_element_t< 0, values_t >::first_type > key_t
Common key type.
iterator & operator++()
Advance to next position.
iterators_t is_
The current position.
typename remove_reference_t< T >::value_type value_t
auto operator*() -> decltype(this->dereference_(Dereference()))
iterator end_(seq< I...>)
std::tuple< value_t< Maps >...> values_t
typename remove_reference_t< T >::const_iterator iterator_t
std::pair< iterator_t< T >, iterator_t< T >> range_t
bool is_done_
Whether we reached the end.
zip_sequences< Sequences...> zip(Sequences &&...seqs)
key_t dereference_first_() const
The common key.
std::tuple< range_t< Maps >...> ranges_t
std::tuple< Maps...> maps_t
Type of the tuple of all the maps.
std::tuple< iterator_t< Maps >...> iterators_t
iterator(zipped_maps &zip, iterator_t< Maps >...is, iterator_t< Maps >...ends)
zipped_maps< Dereference, Maps...> zip_map_tuple(const std::tuple< Maps...> &maps)
iterators_t ends_
The genuine ends.
key_t align_(key_t k, seq< I...>)
Try to align all the ranges to support key k.