Loading [MathJax]/extensions/TeX/AMSsymbols.js
Automatic Differentiation
 
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Loading...
Searching...
No Matches

◆ make_holder()

template<typename F , typename... Args, require_not_plain_type_t< std::invoke_result_t< F, Args &&... > > * = nullptr>
auto stan::math::make_holder ( F &&  func,
Args &&...  args 
)
inline

Calls given function with given arguments.

Constructs an expression from given arguments using given functor.

No holder is necessary if the function is not returning Eigen expression.

Template Parameters
Ftype of the functor
Argstypes of the arguments
Parameters
functhe functor
argsarguments for the functor
Returns
holder referencing expression constructed by given functor

This is similar to calling the functor with given arguments. Except that any rvalue argument will be moved to heap first. The arguments moved to heap are deleted once the expression is destructed.

Template Parameters
Ftype of the functor
Argstypes of the arguments
Parameters
functhe functor
argsarguments for the functor
Returns
holder referencing expression constructed by given functor

Definition at line 437 of file holder.hpp.