Update of /cvsroot/boost/boost/libs/fusion/example/cookbook
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv29238
Modified Files:
do_the_bind.cpp
Log Message:
updates hopelessly outdated version (from pre-CVS era of fusion/functional)
Index: do_the_bind.cpp
===================================================================
RCS file: /cvsroot/boost/boost/libs/fusion/example/cookbook/do_the_bind.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- do_the_bind.cpp 15 Feb 2007 23:19:09 -0000 1.1
+++ do_the_bind.cpp 16 Mar 2007 15:14:46 -0000 1.2
@@ -22,10 +22,10 @@
form.
==============================================================================*/
-#include <boost/fusion/functional/invoke.hpp>
-#include <boost/fusion/functional/unfused_generic.hpp>
-#include <boost/fusion/functional/unfused_rvalue_args.hpp>
-#include <boost/fusion/functional/storable_arguments.hpp>
+#include <boost/fusion/functional/invocation/invoke.hpp>
+#include <boost/fusion/functional/adapter/unfused_generic.hpp>
+#include <boost/fusion/functional/adapter/unfused_rvalue_args.hpp>
+#include <boost/fusion/support/deduce_sequence.hpp>
#include <boost/fusion/sequence/intrinsic/at.hpp>
#include <boost/fusion/sequence/intrinsic/mpl.hpp>
@@ -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 @@
// returned by bind
template <class BindArgs> class fused_bound_function
{
- BindArgs fsq_bind_args;
+ typedef typename traits::deduce_sequence<BindArgs>::type bound_args;
+
+ bound_args fsq_bind_args;
public:
fused_bound_function(BindArgs const & bind_args)
@@ -113,15 +116,15 @@
template <class FinalArgs, bool Enable =
// Disable for empty sequences if we expect arguments
! (result_of::empty<FinalArgs>::value &&
- !! mpl::count_if<BindArgs,is_placeholder<_> >::value) >
+ !! mpl::count_if<bound_args,is_placeholder<_> >::value) >
struct result
{ };
template <class FinalArgs>
struct result<FinalArgs,true>
- : result_of::invoke< typename result_of::front<BindArgs>::type,
+ : result_of::invoke< typename result_of::front<bound_args>::type,
typename result_of::transform<
- typename result_of::pop_front<BindArgs>::type,
+ typename result_of::pop_front<bound_args>::type,
argument_transform<FinalArgs> const
>::type
>
@@ -147,8 +150,8 @@
{
// 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<BindArgs>::type > > type;
+ typedef fusion::unfused_generic<
+ fused_bound_function<BindArgs> > type;
};
template <class BindArgs>
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Boost-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/boost-cvs