7#include <gtest/gtest.h>
19template <
class T,
T... Ints>
20struct to_tuple<std::integer_sequence<T, Ints...>>
22 using type = std::tuple<std::integral_constant<T, Ints>...>;
25template <
class T,
class U>
28 using type = std::tuple<T, U>;
32using to_tuple_t =
typename to_tuple<S>::type;
34template <
class TupleOfTuples,
class Tuple>
37template <
class... Tuples,
class Tuple>
40 using type = std::tuple<
41 decltype(std::tuple_cat(std::declval<Tuples>(), std::declval<Tuple>()))...>;
45template <
class TupleOfTuples,
class Tuple>
48static_assert(std::is_same_v<
50 std::tuple<std::tuple<double, double>, std::tuple<int, double>>,
52 std::tuple<std::tuple<double, double, int>, std::tuple<int, double, int>>>);
54static_assert(std::is_same_v<
55 for_each_tuple_cat_t<std::tuple<std::tuple<double, double>>, std::tuple<int>>,
56 std::tuple<std::tuple<double, double, int>>>);
58template <
class InTupleOfTuples,
class OutTupleOfTuples>
61template <
class... HeadArgs,
class... TailTuples,
class OutTupleOfTuples>
64 std::tuple<TailTuples...>,
65 decltype(std::tuple_cat(
67 for_each_tuple_cat_t<OutTupleOfTuples, std::tuple<HeadArgs>>>()...))>
71template <
class OutTupleOfTuples>
74 using type = OutTupleOfTuples;
79template <
class... InTuplesLike>
81 std::tuple<to_tuple_t<InTuplesLike>...>,
82 std::tuple<std::tuple<>>>::type;
84static_assert(std::is_same_v<
85 cartesian_product_t<std::tuple<int, float>, std::tuple<double>>,
86 std::tuple<std::tuple<int, double>, std::tuple<float, double>>>);
95template <
class... Args>
98 using type = testing::Types<Args...>;
A class which describes the real space in the temporal direction.
Definition geometry.hpp:44
Definition test_utils.hpp:59
Definition test_utils.hpp:35
Transform a sequence S to a tuple:
Definition test_utils.hpp:15
Transform a std::tuple<Args...> to a testing::Types<Args...>, identity otherwise.
Definition test_utils.hpp:91