13 #ifndef TINYMPL_INSERT_HPP
14 #define TINYMPL_INSERT_HPP
16 #include <tinympl/variadic/erase.hpp>
17 #include <tinympl/as_sequence.hpp>
18 #include <tinympl/sequence.hpp>
19 #include <tinympl/join.hpp>
32 template < std::size_t Pos,
35 template<
class ...>
class Out = as_sequence<Seq>::template rebind>
36 struct insert :
insert<Pos, as_sequence_t<SubSeq>, as_sequence_t<Seq>, Out> {};
38 template< std::size_t Pos,
class ... SubSeqArgs,
class ... SeqArgs,
39 template<
class...>
class Out>
41 template<
class ... Us>
42 using head_seq =
sequence<Us ..., SubSeqArgs ... >;
45 SeqArgs ... >::type head;
49 typedef typename join<Out<>, head, tail>::type type;
54 #endif // TINYMPL_INSERT_HPP
Merge two sequences.
Definition: join.hpp:29
The main sequence type.
Definition: sequence.hpp:28
Produce an output sequence from a variadic template by removin the elements in the given range...
Definition: erase.hpp:30
Insert a subsequence into a given sequence at a given position.
Definition: insert.hpp:36