From 798ebd7593c91c825bada665147deef4815d65f7 Mon Sep 17 00:00:00 2001 From: Tobias Schwinger Date: Fri, 16 Mar 2007 15:14:46 +0000 Subject: [PATCH] updates hopelessly outdated version (from pre-CVS era of fusion/functional) [SVN r37201] --- example/cookbook/do_the_bind.cpp | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/example/cookbook/do_the_bind.cpp b/example/cookbook/do_the_bind.cpp index a391fa62..1967e956 100644 --- a/example/cookbook/do_the_bind.cpp +++ b/example/cookbook/do_the_bind.cpp @@ -22,10 +22,10 @@ form. ==============================================================================*/ -#include -#include -#include -#include +#include +#include +#include +#include #include #include @@ -49,6 +49,7 @@ namespace impl { namespace fusion = boost::fusion; + namespace traits = boost::fusion::traits; namespace result_of = boost::fusion::result_of; namespace mpl = boost::mpl; using mpl::placeholders::_; @@ -103,7 +104,9 @@ namespace impl // returned by bind template class fused_bound_function { - BindArgs fsq_bind_args; + typedef typename traits::deduce_sequence::type bound_args; + + bound_args fsq_bind_args; public: fused_bound_function(BindArgs const & bind_args) @@ -113,15 +116,15 @@ namespace impl template ::value && - !! mpl::count_if >::value) > + !! mpl::count_if >::value) > struct result { }; template struct result - : result_of::invoke< typename result_of::front::type, + : result_of::invoke< typename result_of::front::type, typename result_of::transform< - typename result_of::pop_front::type, + typename result_of::pop_front::type, argument_transform const >::type > @@ -147,8 +150,8 @@ namespace impl { // We have to transform the arguments so they are held by-value // in the returned function. - typedef fusion::unfused_generic< fused_bound_function< - typename fusion::storable_arguments::type > > type; + typedef fusion::unfused_generic< + fused_bound_function > type; }; template