diff --git a/doc/html/fusion/functional/generation/functions/make_fused.html b/doc/html/fusion/functional/generation/functions/make_fused.html deleted file mode 100644 index fa9a972a..00000000 --- a/doc/html/fusion/functional/generation/functions/make_fused.html +++ /dev/null @@ -1,129 +0,0 @@ - -
- -![]() |
-Home | -Libraries | -People | -FAQ | -More | -
- Creates a fused
adapter for a given Deferred Callable Object.
- The usual element
- conversion is applied to the target function.
-
-template <typename F>
-inline typename make_fused
<F>::type
-make_fused(F const & f);
-
-Parameter | -Requirement | -Description | -
---|---|---|
f |
-Model - of Deferred - Callable Object - | -The function to transform. | -
-make_fused(f); --
- Return type: A specialization of fused
.
-
- Semantics: Returns a fused
adapter for f
.
-
-#include <boost/fusion/functional/generation/make_fused.hpp> --
-float sub(float a, float b) { return a - b; } - -void try_it() -{ --vector
<int,float> a(2,2.0f); -vector
<int,float> b(1,1.5f); -vector
<float,float> c(1.0f,0.5f); - assert(c ==transform
(zip
(a,b), make_fused(& sub))); - assert(c ==transform
(zip
(a,b), make_fused(std::minus
<float>()))); -} -
fused
deduce
make_fused
- | Copyright © 2001-2005 Joel de Guzman, Dan Marsden | -
![]() |
-Home | -Libraries | -People | -FAQ | -More | -
- Creates a fused_function_object
adapter
- for a given Deferred
- Callable Object. The usual element
- conversion is applied to the target function.
-
-template <typename F>
-inline typename make_fused_function_object
<F>::type
-make_fused_function_object(F const & f);
-
-Parameter | -Requirement | -Description | -
---|---|---|
f |
-Model - of Polymorphic - Function Object - | -The function to transform. | -
-make_fused_function_object(f); --
- Return type: A specialization of fused_function_object
.
-
- Semantics: Returns a fused_function_object
adapter
- for f
.
-
-#include <boost/fusion/functional/generation/make_fused_function_object.hpp> --
-struct sub -{ - template<typename T, typename _> - struct result - { - typedef T type; - }; - - template<typename T> - T operator()(T lhs, T rhs) const - { - return lhs - rhs; - } -}; - -void try_it() -{ --vector
<int,float> a(2,2.0f); -vector
<int,float> b(1,1.5f); -vector
<int,float> c(1,0.5f); - assert(c ==transform
(zip
(a,b), make_fused_function_object(sub()))); -} -
- | Copyright © 2001-2005 Joel de Guzman, Dan Marsden | -
![]() |
-Home | -Libraries | -People | -FAQ | -More | -
- Creates a fused_procedure
adapter for
- a given Deferred
- Callable Object. The usual element
- conversion applied to the target function.
-
-template <typename F>
-inline typename make_fused_procedure
<F>::type
-make_fused_procedure(F const & f);
-
-Parameter | -Requirement | -Description | -
---|---|---|
f |
-Model - of Callable - Object - | -The function to transform. | -
-make_fused_procedure(f); --
- Return type: A specialization of fused_procedure
.
-
- Semantics: Returns a fused_procedure
adapter for
- f
.
-
-#include <boost/fusion/functional/generation/make_fused_procedure.hpp> --
--vector
<int,int,int> v(1,2,3); -using namespace boost::lambda; -make_fused_procedure(_1 += _2 - _3)(v); -assert(front
(v) == 0); -
- | Copyright © 2001-2005 Joel de Guzman, Dan Marsden | -
![]() |
-Home | -Libraries | -People | -FAQ | -More | -
- Creates a unfused_generic
adapter for
- a given, unary Polymorphic
- Function Object. The usual element
- conversion is applied to the target function.
-
-template <typename F>
-inline typename make_unfused_generic
<F>::type
-make_unfused_generic(F const & f);
-
-Parameter | -Requirement | -Description | -
---|---|---|
f |
-Model - of Polymorphic - Function Object - | -The function to transform. | -
-make_unfused_generic(f); --
- Return type: A specialization of unfused_generic
.
-
- Semantics: Returns a unfused_generic
adapter for
- f
.
-
-#include <boost/fusion/functional/generation/make_unfused_generic.hpp> --
-struct bottles_song
-{
- template<class Seq>
- struct result
- : mpl::if_< mpl::less< result_of::size
<Seq>, mpl::int_<2> >,
- boost::blank, mpl::identity<void> >::type
- { };
-
- template<class Seq>
- void operator()(Seq & s) const
- {
- typename result_of::at_c<Seq,0>::type n = at_c<0>(s);
- typename result_of::at_c<Seq,1>::type what = at_c<1>(s);
-
- std::cout
- << n << " bottles of " << what << " on the wall.\n"
- << n << " bottles of " << what << "!\n"
- << "Take one down - pass it around.\n";
-
- n -= 1; // glug glug...
-
- std::cout
- << n << " bottles of " << what << " on the wall.\n"
- << std::endl;
- }
-};
-
-void try_it()
-{
- unsigned n_milk = 99;
- for(int i = 0; i < 3; ++i)
- make_unfused_generic(bottles_song())(n_milk,"milk");
- // 96 bottles left for me
-}
-
-- | Copyright © 2001-2005 Joel de Guzman, Dan Marsden | -
![]() |
-Home | -Libraries | -People | -FAQ | -More | -
- Creates a unfused_lvalue_args
adapter
- for a given, unary Polymorphic
- Function Object. The usual element
- conversion is applied to the target function.
-
-template <typename F>
-inline typename make_unfused_lvalue_args
<F>::type
-make_unfused_lvalue_args(F const & f);
-
-Parameter | -Requirement | -Description | -
---|---|---|
f |
-Model - of Polymorphic - Function Object - | -The function to transform. | -
-make_unfused_lvalue_args(f); --
- Return type: A specialization of unfused_lvalue_args
.
-
- Semantics: Returns a unfused_lvalue_args
adapter
- for f
.
-
-#include <boost/fusion/functional/generation/make_unfused_lvalue_args.hpp> --
-struct fused_incrementer
-{
- template <class Seq>
- struct result
- {
- typedef void type;
- };
-
- template <class Seq>
- void operator()(Seq const & s) const
- {
- for_each
(s,++boost::lambda::_1);
- }
-};
-
-void try_it()
-{
- int a = 2; char b = 'X';
- make_unfused_lvalue_args(fused_incrementer())(a,b);
- assert(a == 3 && b == 'Y');
-}
-
-- | Copyright © 2001-2005 Joel de Guzman, Dan Marsden | -
![]() |
-Home | -Libraries | -People | -FAQ | -More | -
- Creates a unfused_rvalue_args
adapter
- for a given, unary Polymorphic
- Function Object. The usual element
- conversion is applied to the target function.
-
-template <typename F>
-inline typename make_unfused_rvalue_args
<F>::type
-make_unfused_rvalue_args(F const & f);
-
-Parameter | -Requirement | -Description | -
---|---|---|
f |
-Model - of Polymorphic - Function Object - | -The function to transform. | -
-make_unfused_rvalue_args(f); --
- Return type: A specialization of unfused_rvalue_args
.
-
- Semantics: Returns a unfused_rvalue_args
adapter
- for f
.
-
-#include <boost/fusion/functional/generation/make_unfused_rvalue_args.hpp> --
-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() -{ - make_unfused_rvalue_args(sequence_printer()) - (24,"bottles of beer in",'a',"box."); -} --
- | Copyright © 2001-2005 Joel de Guzman, Dan Marsden | -
![]() |
-Home | -Libraries | -People | -FAQ | -More | -
- Returns the result type of make_fused
.
-
-#include <boost/fusion/functional/generation/make_fused.hpp> --
-namespace result_of -{ - template<typename Function> - struct make_fused - { - typedef unspecified type; - }; -} --
- | Copyright © 2001-2005 Joel de Guzman, Dan Marsden | -
![]() |
-Home | -Libraries | -People | -FAQ | -More | -
- Returns the result type of make_fused_function_object
.
-
-#include <boost/fusion/functional/generation/make_fused_function_object.hpp> --
-namespace result_of -{ - template<typename Function> - struct make_fused_function_object - { - typedef unspecified type; - }; -} --
- | Copyright © 2001-2005 Joel de Guzman, Dan Marsden | -
![]() |
-Home | -Libraries | -People | -FAQ | -More | -
- Returns the result type of make_fused_procedure
.
-
-#include <boost/fusion/functional/generation/make_fused_procedure.hpp> --
-namespace result_of -{ - template<typename Function> - struct make_fused_procedure - { - typedef unspecified type; - }; -} --
- | Copyright © 2001-2005 Joel de Guzman, Dan Marsden | -
![]() |
-Home | -Libraries | -People | -FAQ | -More | -
- Returns the result type of make_unfused_generic
.
-
-#include <boost/fusion/functional/generation/make_unfused_generic.hpp> --
-namespace result_of -{ - template<typename Function> - struct make_unfused_generic - { - typedef unspecified type; - }; -} --
- | Copyright © 2001-2005 Joel de Guzman, Dan Marsden | -
![]() |
-Home | -Libraries | -People | -FAQ | -More | -
- Returns the result type of make_unfused_lvalue_args
.
-
-#include <boost/fusion/functional/generation/make_unfused_lvalue_args.hpp> --
-namespace result_of -{ - template<typename Function> - struct make_unfused_lvalue_args - { - typedef unspecified type; - }; -} --
- | Copyright © 2001-2005 Joel de Guzman, Dan Marsden | -
![]() |
-Home | -Libraries | -People | -FAQ | -More | -
- Returns the result type of make_unfused_rvalue_args
.
-
-#include <boost/fusion/functional/generation/make_unfused_rvalue_args.hpp> --
-namespace result_of -{ - template<typename Function> - struct make_unfused_rvalue_args - { - typedef unspecified type; - }; -} --
- | Copyright © 2001-2005 Joel de Guzman, Dan Marsden | -
![]() |
-Home | -Libraries | -People | -FAQ | -More | -
- Calls a Deferred - Callable Object with the arguments from a Sequence. -
-
- The corresponding metafunction, result_of::invoke
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. -
-
- If the target function is a pointer to a class members, the 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
).
-
-template< - typename Function, - class Sequence - > -typename-result_of::invoke
<Function, Sequence>::type -invoke(Function f, Sequence & s); - -template< - typename Function, - class Sequence - > -typenameresult_of::invoke
<Function, Sequence const>::type -invoke(Function f, Sequence const & s); -
Parameter | -Requirement | -Description | -
---|---|---|
f |
-A - Deferred - Callable Object - | -The function to call. | -
s |
-A - Forward - Sequence - | -The arguments. | -
-invoke(f,s); --
- Return type: Return type of f
when invoked with the elements in
- s
as its arguments.
-
- Semantics: Invokes f
- with the elements in s
- as arguments and returns the result of the call expression.
-
-#include <boost/fusion/functional/invocation/invoke.hpp> --
--std::plus
<int> add; -assert(invoke(add,make_vector
(1,1)) == 2); -
- | Copyright © 2001-2005 Joel de Guzman, Dan Marsden | -
![]() |
-Home | -Libraries | -People | -FAQ | -More | -
- Calls a Polymorphic Function - Object with the arguments from a Sequence. -
-
- The corresponding metafunction, result_of::invoke_function_object
, does
- not define a type
member,
- if the nested result
- class template of the target function object is empty.
-
- The first template parameter can be specialized explicitly to avoid copying - and/or to control the const qualification of a function object. -
--template< - typename Function, - class Sequence - > -typename-result_of::invoke_function_object
<Function, Sequence>::type -invoke_function_object(Function f, Sequence & s); - -template< - typename Function, - class Sequence - > -typenameresult_of::invoke_function_object
<Function, Sequence const>::type -invoke_function_object(Function f, Sequence const & s); -
Parameter | -Requirement | -Description | -
---|---|---|
f |
-Model - of Polymorphic - Function Object - | -The function object to call. | -
s |
-Model - of Forward - Sequence - | -The arguments. | -
-invoke_procedure(f,s); --
- Return type: Return type of f
when invoked with the elements in
- s
as its arguments.
-
- Semantics: Invokes f
- with the elements in s
- as arguments and returns the result of the call expression.
-
-#include <boost/fusion/functional/invocation/invoke_function_object.hpp> --
-struct sub
-{
- template<typename T, typename _>
- struct result
- {
- typedef T type;
- };
-
- template<typename T>
- T operator()(T lhs, T rhs) const
- {
- return lhs - rhs;
- }
-};
-
-void try_it()
-{
- sub f;
- assert(f(2,1) == invoke_function_object(f,make_vector
(2,1)));
-}
-
-- | Copyright © 2001-2005 Joel de Guzman, Dan Marsden | -
![]() |
-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 - > -typename-result_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-2005 Joel de Guzman, Dan Marsden | -
![]() |
-Home | -Libraries | -People | -FAQ | -More | -
- Returns the result type of invoke
.
-
- Empty for non-class target function types whose arity is not satisfied - by the size of the sequence. -
--namespace result_of -{ - template< - typename Function, - class Sequence - > - struct invoke - { - typedef unspecified type; - }; -} --
- | Copyright © 2001-2005 Joel de Guzman, Dan Marsden | -
![]() |
-Home | -Libraries | -People | -FAQ | -More | -
- Returns the result type of invoke_function_object
.
-
- Empty if the target function's nested result
- class template is empty.
-
-namespace result_of -{ - template< - class Function, - class Sequence - > - struct invoke_function_object - { - typedef unspecified type; - }; -} --
- | Copyright © 2001-2005 Joel de Guzman, Dan Marsden | -
![]() |
-Home | -Libraries | -People | -FAQ | -More | -
- Returns the result type of invoke_procedure
.
-
- Empty for non-class target function types whose arity is not satisfied - by the size of the sequence. -
--namespace result_of -{ - template< - typename Function, - class Sequence - > - struct invoke_procedure - { - typedef unspecified type; - }; -} --
- | Copyright © 2001-2005 Joel de Guzman, Dan Marsden | -