13 #ifndef TINYMPL_VARIADIC_ERASE_HPP
14 #define TINYMPL_VARIADIC_ERASE_HPP
30 template<std::size_t start,std::size_t end,
template<
class ...>
class Out,
class ... Args>
struct erase;
32 template<std::size_t start,std::size_t end,
template<
class ...>
class Out,
class ... Args>
using erase_t =
typename erase<start,end,Out,Args...>::type;
34 template<std::size_t start,std::size_t end,
template<
class ...>
class Out,
class Head,
class ... Args>
struct erase<start,end,Out,Head,Args...>
37 template<
class ... CopiedElements>
40 typedef typename erase<start-1,end-1,Out,Args...>::template impl<CopiedElements...,Head>::type type;
43 template<std::size_t,std::size_t,
template<
class ...>
class,
class ...>
friend struct erase;
46 static_assert(start <= end,"Start > end!
");
48 typedef typename impl<>::type type;
51 template<std::size_t end,template<class ...> class Out,class Head,class ... Args> struct erase<0,end,Out,Head,Args...>
54 template<class ... CopiedElements>
57 typedef typename erase<0,end-1,Out,Args...>::template impl<CopiedElements...>::type type;
60 template<std::size_t,std::size_t,template<class ...> class,class ...> friend struct erase;
63 typedef typename impl<>::type type;
66 template<template<class ...> class Out,class Head,class ... Args> struct erase<0,0,Out,Head,Args...>
69 template<class ... CopiedElements>
72 typedef Out<CopiedElements..., Head,Args...> type;
75 template<std::size_t,std::size_t,template<class ...> class,class ...> friend struct erase;
78 typedef typename impl<>::type type;
81 template<template<class ...> class Out> struct erase<0,0,Out>
84 template<class ... CopiedElements>
87 typedef Out<CopiedElements...> type;
90 template<std::size_t,std::size_t,template<class ...> class,class ...> friend struct erase;
93 typedef typename impl<>::type type;
96 } // namespace variadic
97 } // namespace tinympl
99 #endif // TINYMPL_VARIADIC_ERASE_HPP
Produce an output sequence from a variadic template by removin the elements in the given range...
Definition: erase.hpp:30