tinympl  0.2
mini MPL library for C++11
transform_many.hpp
1 // Copyright (C) 2013, Ennio Barbaro.
2 //
3 // Use, modification, and distribution is subject to the Boost Software
4 // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
5 // http://www.boost.org/LICENSE_1_0.txt)
6 //
7 // See http://sbabbi.github.io/tinympl for documentation.
8 //
9 // You are welcome to contact the author at:
10 // enniobarbaro@gmail.com
11 //
12 
13 #ifndef TINYMPL_TRANSFORM_MANY_HPP
14 #define TINYMPL_TRANSFORM_MANY_HPP
15 
16 #include <tinympl/transform.hpp>
17 #include <tinympl/transpose.hpp>
18 #include <tinympl/copy.hpp>
19 #include <tinympl/sequence.hpp>
20 
21 namespace tinympl {
22 
35 template<template<class ...> class F,
36  template<class ...> class Out,
37  class ... Sequences>
39  template<class Seq> using F_t = typename copy<Seq, F>::type::type;
40 
41  typedef typename transform <
42  typename transpose< sequence<Sequences...>, sequence, sequence>::type,
43  F_t,
44  Out >::type type;
45 };
46 
47 } // namespace tinympl
48 
49 #endif // TINYMPL_TRANSFORM_MANY_HPP
Transpose a sequence of sequences.
Definition: transpose.hpp:45
Transform an input sequence using a transform function.
Definition: transform.hpp:37
Copy the elements from the input sequence to the output sequence.
Definition: copy.hpp:35
The main sequence type.
Definition: sequence.hpp:28
Transform many input sequences using a function.
Definition: transform_many.hpp:38