16#ifndef dealii_base_mutable_bind_h
17#define dealii_base_mutable_bind_h
89 using TupleType = std::tuple<
typename std::remove_cv<
90 typename std::remove_reference<FunctionArgs>::type>::type...>;
96 template <
class FunctionType>
103 template <
class FunctionType>
110 template <
class FunctionType>
224 template <
class FunctionType>
235 template <
class FunctionType>
236 MutableBind<ReturnType, FunctionArgs...>::MutableBind(
FunctionType function,
237 TupleType && arguments)
239 , arguments(
std::
move(arguments))
245 template <
class FunctionType>
246 MutableBind<ReturnType, FunctionArgs...>::MutableBind(
FunctionType function)
254 MutableBind<ReturnType, FunctionArgs...>::operator()()
const
256 return std_cxx17::apply(function, arguments);
263 MutableBind<ReturnType, FunctionArgs...>::set_arguments(
266 arguments = std::make_tuple(std::move(
args)...);
273 MutableBind<ReturnType, FunctionArgs...>::set_arguments(TupleType &&
args)
275 arguments = std::move(
args);
282 MutableBind<ReturnType, FunctionArgs...>::parse_arguments(
297 return MutableBind<ReturnType,
FunctionArgs...>(function,
298 std::move(arguments)...);
307 return MutableBind<ReturnType,
FunctionArgs...>(function);
317 return MutableBind<ReturnType,
FunctionArgs...>(function,
318 std::move(arguments)...);
327 return MutableBind<ReturnType,
FunctionArgs...>(function);
std::tuple< typename std::remove_cv< typename std::remove_reference< FunctionArgs >::type >::type... > TupleType
ReturnType operator()() const
MutableBind(FunctionType function)
void set_arguments(FunctionArgs &&...arguments)
MutableBind(FunctionType function, TupleType &&arguments)
const std::function< ReturnType(FunctionArgs...)> function
void set_arguments(TupleType &&arguments)
MutableBind(FunctionType function, FunctionArgs &&...arguments)
void parse_arguments(const std::string &value_string, const Patterns::PatternBase &pattern= *Patterns::Tools::Convert< TupleType >::to_pattern())
#define DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_CLOSE
MutableBind< ReturnType, FunctionArgs... > mutable_bind(ReturnType(*function)(FunctionArgs...), std_cxx20::type_identity_t< FunctionArgs > &&...arguments)
typename type_identity< T >::type type_identity_t