13 #ifndef TINYMPL_VARIADIC_COPY_IF_HPP
14 #define TINYMPL_VARIADIC_COPY_IF_HPP
16 #include <type_traits>
34 template<
template<
class ... T>
class F,
35 template<class ...> class Out,
38 template<
template<
class ... T>
class F,
39 template<class ...> class Out,
42 struct
copy_if<F, Out, Head, Tail...> {
44 template<
class ... CopiedElements>
46 template<
class ... Args>
47 using next =
typename copy_if<F, Out, Tail...>::template
48 impl<CopiedElements..., Args...>;
50 typedef typename std::conditional < F<Head>::type::value,
51 typename next<Head>::type,
56 template<
template<
class ... T>
class,
57 template<
class ...>
class,
58 class ...>
friend struct copy_if;
61 typedef typename impl<>::type type;
64 template<
template<
class ... T>
class F, template<class ...> class Out>
67 template<
class ... CopiedElements>
69 typedef Out<CopiedElements...> type;
72 template<
template<
class ... T>
class,
template<
class ...>
class,
class ...>
73 friend struct copy_if;
76 typedef typename impl<>::type type;
82 #endif // TINYMPL_VARIADIC_COPY_IF_HPP
Copy the elements of a given input sequence which satisfy a given predicate - the ordering is preserv...
Definition: copy_if.hpp:36
Copy the elements of a given input sequence which satisfy a given predicate - the ordering is preserv...
Definition: copy_if.hpp:37