![]() |
Home | Libraries | People | FAQ | More |
An n-ary Polymorphic Function Object adapter template for an unary Polymorphic Function Object target function. When called, its arguments are bundled to a Random Access Sequence of references that is passed to the target function object. All referenced objects in the sequence are const qualified.
The type of the target function is allowed to be const qualified or a reference.
Const qualification is preserved and propagated appropriately (in other
words, only const versions of operator()
can be used
if the target function object is const - or, in case the target function
object is held by value, the adapter is const).
#include <boost/fusion/functional/adapter/unfused_rvalue_args.hpp>
template <class Function> class unfused_rvalue_args;
Parameter |
Description |
Default |
---|---|---|
|
A unary Polymorphic Function Object |
|
Notation
F
f
F
UR
unfused_rvalue_args<F>
ur
UR
, initialized
with f
a0
...aN
ur
Expression |
Semantics |
---|---|
|
Creates a fused function as described above, initializes the target
function with |
|
Creates a fused function as described above, attempts to use |
|
Calls |
struct sequence_printer { template <class Seq> struct result { typedef void type; }; template <class Seq> void operator()(Seq const & s) const { std::cout << s << std::endl; } }; void try_it() { unfused_rvalue_args<sequence_printer> print; print(24,"bottles of beer in",'a',"box."); }
Copyright © 2001-2007 Joel de Guzman, Dan Marsden, Tobias Schwinger |