SUNphi  1.0
TupleTypeCat.hpp
Go to the documentation of this file.
1 #ifndef _TUPLETYPECAT_HPP
2 #define _TUPLETYPECAT_HPP
3 
4 /// \file TupleTypeCat.hpp
5 ///
6 /// \brief Used to detect the type of catting a number of Tuple
7 
8 #include <tuple/TupleWrap.hpp>
9 
10 namespace SUNphi
11 {
12  /// Define a \c tuple catting all tuple parameter types, and plain
13  /// types of all parameters
14  ///
15  /// Creates a \c tuple from all passed parameters. If an argument is
16  /// a tuple, consider its parameter types. Otherwise consider the
17  /// type itself.
18  ///
19  /// Example:
20  /// \code
21  /// typedef Tuple<int,double> T;
22  /// TupleTypeCatT<T,T> test1; // Tuple<int,double,int,double>
23  /// TupleTypeCatT<T,char> test2; // Tuple<int,double,char>
24  /// \endcode
25  template <class...Tp>
26  using TupleTypeCatT=
27  decltype(tuple_cat(TupleWrap<Tp>{}...));
28 }
29 
30 #endif