14#ifndef dealii_cxx20_functional_h
15#define dealii_cxx20_functional_h
19#ifdef DEAL_II_HAVE_CXX20
31#ifndef DEAL_II_HAVE_CXX20
43 typename BoundArgsTuple,
45 constexpr decltype(
auto)
46 call_bind(F &&function,
47 std::index_sequence<Ind...>,
48 BoundArgsTuple &&bound_args,
49 CallArgs &&...call_args)
51 return std::invoke(std::forward<F>(function),
53 std::forward<BoundArgsTuple>(bound_args))...,
54 std::forward<CallArgs>(call_args)...);
61 template <
typename F,
typename... BoundArgs>
63 make_bind_front(F &&f, BoundArgs &&...bound_args)
65 return [f = std::forward<F>(f),
66 bound_args = std::make_tuple(
67 std::forward<BoundArgs>(bound_args)...)](
auto &&...call_args) {
71 std::index_sequence_for<BoundArgs...>{},
73 std::forward<decltype(call_args)>(call_args)...);
119 template <
typename F,
typename... BoundArgs>
123 return internal::make_bind_front(std::forward<F>(f),
124 std::forward<BoundArgs>(bound_args)...);
127 using std::bind_front;
#define DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_CLOSE
Tensor< 2, dim, Number > F(const Tensor< 2, dim, Number > &Grad_u)
decltype(auto) bind_front(F &&f, BoundArgs &&...bound_args)