![]() |
Home | Libraries | People | FAQ | More |
Calls a Callable Object with the arguments from a Sequence. The result of the call is ignored.
The corresponding metafunction, __result_of_invoke_procedure, does not
define a type
member
for target functions of non-class type whose arity is not satisfied by
the size of the sequence.
The first template parameter can be specialized explicitly to avoid copying and/or to control the const qualification of a function object.
For pointers to class members corresponding object can be specified as
a reference, pointer, or smart pointer. In case of the latter, a freestanding
get_pointer
function must be defined (Boost provides
this function for std::auto_ptr
and boost::shared_ptr
).
The target function must not be a pointer to a member object (dereferencing such a pointer without returning anything does not make sense, so it isn't implemented).
template< typename Function, class Sequence > typenameresult_of::invoke_procedure
<Function, Sequence>::type invoke_procedure(Function f, Sequence & s); template< typename Function, class Sequence > typenameresult_of::invoke_procedure
<Function, Sequence const>::type invoke_procedure(Function f, Sequence const & s);
Parameter | Requirement | Description |
---|---|---|
f |
Model of Callable Object | The function to call. |
s |
Model of Forward Sequence | The arguments. |
invoke_procedure(f,s);
Return type: void
Semantics: Invokes f
with the elements in s
as arguments.
#include <boost/fusion/functional/invocation/invoke_procedure.hpp>
vector
<int,int> v(1,2); using namespace boost::lambda; invoke_procedure(_1 += _2, v); assert(front
(v) == 3);
Copyright © 2001-2007 Joel de Guzman, Dan Marsden, Tobias Schwinger |