Sequint

This is a small template library hosting a complete list of template functionality to work uniformly with sequences, whether they're of types or values.

A 'sequence' of types is a class template instantiation of which the only parameters that appear are typenames.

Depending on your compiler's standard version, a sequence of values is a template class instantiation of which all parameters are values.

  • --std=c++11: all parameters must be of type 'index_type' (a typedef for std::ptrdiff_t).
  • --std=c++14: all parameters must be of the same type.
  • --std=c++17;--std=c++20: parameters can be heterogeneously typed.

You can select behavior associated with an older version, even though the standard used is newer by defining G_SEQ_KIND.

All templates have a type member. The type member is directly available by using the _t suffix.

The value member, where applicable, can always be directly referred to by using the _v suffix.

GrimoireGrimoire
The book is always better.
>

Index

at_index<index_type,Seq>
at_index_t<index_type,TSeq>
at_index_v<index_type,VSeq>

seq_merge<Seq0,Seq1>

seq_pop_front<Seq>
seq_pop_back<Seq>

seq_set<SeqDst,SeqSrc>

SequenceCombine<Seq0,Seq1,Func>
SequenceTransform<Seq,Func>

seq_exclude<bool,Seq,Mask>

seq_reverse<Seq>

seq_wrap<typename...T>
seq_wrap<VSeq>

seq_size<Seq>

is_seq<typename>
is_seq_empty<Seq>

seq_contains<SeqHaystack,SeqNeedle>

seq_clear<Seq>

gen_seq<index_type>

seq_repeat_n<Seq,Seq1N>
seq_repeat_each_n<Seq,SeqNN>

seq_leave_pos_n<Seq,index_type pos,index_type length>
seq_pos_pos_incl<Seq,index_type pos0,index_type pos1>
seq_clip_x0_x1<Seq,index_type x0,index_type x1>
seq_copy_pos_n<Seq,index_type pos,index_type n>
seq_remove_pos_n<Seq,index_type pos,index_type n>

seq_sort<Compare,Seq>

seq_copy_last_n<Seq,index_type>
seq_pop_n_front<Seq,index_type>
seq_pop_n_back<Seq,index_type>

seq_mask_true_indices<Mask>

seq_insert_pos<SeqDest,SeqSrc,index_type Pos>
seq_repeat_insert<Seq,SeqInsert,SeqIndices>

seq_replace_substr<SeqReplaceIn,SeqWith,index_type pos, index_type length>
seq_replace_range<SeqReplaceIn,SeqWith,index_type pos0, index_type pos1>

seq_static_array<VSeq>

seq_compare_count<Seq,Compare>
seq_compare_count<Seq,std::integral_constant<index_type, startpos>,Compare>

seq_swap_two<Seq,index_type index0,index_type index1>

dimseq<Array>

seq_find<SeqHaystack,SeqNeedle>
seq_find<SeqHaystack,SeqNeedle,std::integral_constant<index_type,StartPos>>
seq_find_one_pred<Predicate,Seq>
seq_find_one_pred<Predicate,Seq,SeqPos>
seq_find_mask<SeqHaystack,SeqNeedle>
seq_find_any_or_not_in<bool,SeqHaystack,SeqNeedles>
seq_find_any<SeqHaystack,SeqNeedles>
seq_find_not_in<SeqHaystack,SeqNeedles>
seq_find_any_mask<SeqHaystack,SeqNeedles>

seq_distinct<Seq>

pred_wrap<Fn>
seq_pred<SeqHaystack,Pred>
seq_pred_mask<SeqHaystack,Pred>
seq_unary<SeqHaystack,Pred>

seq_equivalence<Seq,Compare>

seq_extremum<bool,Seq,Compare>
seq_min<Seq>
seq_max<Seq>

seq_order<Seq,Compare>

seq_bits<typename T,T...>

seq_chop<Seq,SeqPartSizes>

seq_rotl<Seq,index_type N>
seq_rotr<Seq,index_type N>

seq_splice<Seq...>

seq_permutation<Seq,SeqPermIndices>
seq_retrieve_permutation<Seq,SeqPermuted>
               
<