18template <
typename Function>
27template <
typename Result,
typename Class,
typename... Args>
30 using type = boost::mp11::mp_list<Args...>;
34template <
typename Result,
typename Class,
typename... Args>
37 using type = boost::mp11::mp_list<Args...>;
41template <
typename Result,
typename... Args>
44 using type = boost::mp11::mp_list<Args...>;
48template <
typename Function>
50 std::type_identity<boost::mp11::mp_transform<
54template <
typename Function>
63template <
typename Result,
typename Class,
typename... Args>
70template <
typename Result,
typename Class,
typename... Args>
77template <
typename Result,
typename... Args>
88template <
typename Object,
90 typename... MemberFunctionArgumentTypesPlain>
96 decltype(&std::decay_t<Object>::operator())>::type
103template <
typename Result,
107 typename... MemberFunctionArgumentTypesPlain>
109 boost::mp11::mp_list<MemberFunctionArgumentTypesPlain...>,
110 Result (Object::*m)(Args...),
119template <
typename Result,
123 typename... MemberFunctionArgumentTypesPlain>
125 boost::mp11::mp_list<MemberFunctionArgumentTypesPlain...>,
126 Result (Object::*m)(Args...),
135template <
typename Result,
139 typename... MemberFunctionArgumentTypesPlain>
141 boost::mp11::mp_list<MemberFunctionArgumentTypesPlain...>,
142 Result (Object::*m)(Args...)
const,
151template <
typename Result,
154 typename... FunctionArgumentTypesPlain>
156 Result (*fct)(Args...),
162template <
typename Function,
typename... PassedArgsTuples>
173template <
typename Result,
175 typename... DeclaredArgs,
177 typename... PassedArgsTuples>
185 std::remove_cvref_t<PassedArgsTuples>...>::type;
189template <
typename Result,
191 typename... DeclaredArgs,
192 typename... ClassAndPassedArgsTuples>
194 ClassAndPassedArgsTuples...>
197 ClassAndPassedArgsTuples...>
202template <
typename Result,
typename... DeclaredArgs,
typename... Tuples>
206 std::remove_cvref_t<Tuples>...>::type;
219template <
typename Function,
typename... Args>
225 using FunctionPlain = std::decay_t<Function>;
226 using FlattenedTuple =
228 using FlattenedTupleOfPlainTypes =
229 mp_transform<std::remove_cvref_t, FlattenedTuple>;
232 mp_is_set_v<FlattenedTupleOfPlainTypes>,
233 "The types of all elements of all passed tuples must be unique.");
235 using FunctionArgumentTypesPlain =
239 mp_is_set_v<FunctionArgumentTypesPlain>,
240 "The argument types of the function to be called must be unique.");
243 std::forward<Function>(f),
244 std::forward<Args>(args)...);
256template <
typename Function,
typename... Tuples>
257auto apply(Function& f, Tuples&... ts) ->
260 static_assert(boost::mp11::mp_similar<std::tuple<>,
261 std::remove_cv_t<Tuples>...>::value,
262 "In the argument ts... there must be only std::tuple's.");
273template <
typename Function,
typename... Tuples>
274auto eval(Function& f, Tuples&... ts) ->
277 static_assert(boost::mp11::mp_similar<std::tuple<>,
278 std::remove_cv_t<Tuples>...>::value,
279 "In the argument ts... there must be only std::tuple's.");
293template <
typename Functions,
typename... Tuples>
296 boost::mp11::tuple_for_each(fs, [&ts...](
auto& f) { eval(f, ts...); });
auto unpackAndInvoke(boost::mp11::mp_list< MemberFunctionArgumentTypesPlain... >, Object &&o, Tuples &... ts) -> typename GetFunctionReturnType< decltype(&std::decay_t< Object >::operator())>::type
auto applyImpl(Function &&f, Args &&... args) -> typename detail::GetFunctionReturnType< std::decay_t< Function > >::type
std::type_identity< boost::mp11::mp_transform< std::remove_cvref_t, typename GetFunctionArgumentTypes< Function >::type > > GetFunctionArgumentTypesPlain
auto apply(Function &f, Tuples &... ts) -> typename detail::GetFunctionReturnType< std::decay_t< Function > >::type
auto & get(Tuples &... ts)
void evalAllInOrder(Functions &fs, Tuples &... ts)
auto eval(Function &f, Tuples &... ts) -> typename detail::GetFunctionReturnType< decltype(&Function::eval)>::type
typename detail::GetFlattenedTupleTypes< std::remove_cvref_t< PassedArgsTuples >... >::type type
typename detail::GetFlattenedTupleTypes< std::remove_cvref_t< Tuples >... >::type type
boost::mp11::mp_list< Args... > type
boost::mp11::mp_list< Args... > type
boost::mp11::mp_list< Args... > type