Nui
tuple_transform.hpp
Go to the documentation of this file.
1 #pragma once
2 
3 #include <tuple>
4 
5 namespace Nui::Detail
6 {
7  template <typename Tuple, template <typename> typename Predicate>
9  {};
10 
11  template <template <typename> typename Predicate, typename... List>
12  struct TupleTransform<std::tuple<List...>, Predicate>
13  {
14  using type = std::tuple<typename Predicate<List>::type...>;
15  };
16 
17  template <typename Tuple, template <typename> typename Predicate>
19 
20  template <typename Tuple, template <typename> typename Predicate>
22  {};
23 
24  template <template <typename> typename Predicate, typename... List>
25  struct FlatTupleTransform<std::tuple<List...>, Predicate>
26  {
27  using type = decltype(std::tuple_cat(std::declval<typename Predicate<List>::type>()...));
28  };
29 
30  template <typename Tuple, template <typename> typename Predicate>
32 }
Definition: rpc_hub.hpp:23
typename TupleTransform< Tuple, Predicate >::type TupleTransform_t
Definition: tuple_transform.hpp:18
typename FlatTupleTransform< Tuple, Predicate >::type FlatTupleTransform_t
Definition: tuple_transform.hpp:31
decltype(std::tuple_cat(std::declval< typename Predicate< List >::type >()...)) type
Definition: tuple_transform.hpp:27
Definition: tuple_transform.hpp:22
std::tuple< typename Predicate< List >::type... > type
Definition: tuple_transform.hpp:14
Definition: tuple_transform.hpp:9