16 #ifndef dealii_base_mutable_bind_h
17 #define dealii_base_mutable_bind_h
83 template <
typename ReturnType,
class... FunctionArgs>
91 using TupleType = std::tuple<
typename std::remove_cv<
92 typename std::remove_reference<FunctionArgs>::type>::type...>;
98 template <
class FunctionType>
105 template <
class FunctionType>
112 template <
class FunctionType>
151 const std::unique_ptr<Patterns::PatternBase> &pattern =
158 const std::function<ReturnType(FunctionArgs...)>
function;
190 template <
typename ReturnType,
class... FunctionArgs>
198 template <
typename ReturnType,
class... FunctionArgs>
200 mutable_bind(std::function<ReturnType(FunctionArgs...)>,
213 template <
typename ReturnType,
class... FunctionArgs>
220 template <
typename ReturnType,
class... FunctionArgs>
222 mutable_bind(std::function<ReturnType(FunctionArgs...)>);
227 template <
typename ReturnType,
class... FunctionArgs>
228 template <
class FunctionType>
230 FunctionType
function,
231 FunctionArgs &&... arguments)
233 , arguments(std::make_tuple(std::move(arguments)...))
238 template <
typename ReturnType,
class... FunctionArgs>
239 template <
class FunctionType>
241 TupleType && arguments)
243 , arguments(std::move(arguments))
248 template <
typename ReturnType,
class... FunctionArgs>
249 template <
class FunctionType>
256 template <
typename ReturnType,
class... FunctionArgs>
265 template <
typename ReturnType,
class... FunctionArgs>
268 FunctionArgs &&... args)
270 arguments = std::make_tuple(std::move(args)...);
275 template <
typename ReturnType,
class... FunctionArgs>
279 arguments = std::move(args);
284 template <
typename ReturnType,
class... FunctionArgs>
287 const std::string & value_string,
288 const std::unique_ptr<Patterns::PatternBase> &pattern)
296 template <
typename ReturnType,
class... FunctionArgs>
297 MutableBind<ReturnType, FunctionArgs...>
301 return MutableBind<ReturnType, FunctionArgs...>(
function,
302 std::move(arguments)...);
307 template <
typename ReturnType,
class... FunctionArgs>
308 MutableBind<ReturnType, FunctionArgs...>
311 return MutableBind<ReturnType, FunctionArgs...>(
function);
316 template <
typename ReturnType,
class... FunctionArgs>
317 MutableBind<ReturnType, FunctionArgs...>
318 mutable_bind(std::function<ReturnType(FunctionArgs...)>
function,
321 return MutableBind<ReturnType, FunctionArgs...>(
function,
322 std::move(arguments)...);
327 template <
typename ReturnType,
class... FunctionArgs>
328 MutableBind<ReturnType, FunctionArgs...>
329 mutable_bind(std::function<ReturnType(FunctionArgs...)>
function)
331 return MutableBind<ReturnType, FunctionArgs...>(
function);