$include_dir="/home/hyper-archives/boost-commit/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-commit] svn:boost r54674 - in sandbox/SOC/2009/fusion/boost/fusion/functional: . adapter adapter/detail generation generation/detail invocation invocation/detail
From: mr.chr.schmidt_at_[hidden]
Date: 2009-07-05 11:43:48
Author: cschmidt
Date: 2009-07-05 11:43:45 EDT (Sun, 05 Jul 2009)
New Revision: 54674
URL: http://svn.boost.org/trac/boost/changeset/54674
Log:
cleanup (2)
Added:
   sandbox/SOC/2009/fusion/boost/fusion/functional/
   sandbox/SOC/2009/fusion/boost/fusion/functional/adapter/
   sandbox/SOC/2009/fusion/boost/fusion/functional/adapter.hpp   (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/functional/adapter/detail/
   sandbox/SOC/2009/fusion/boost/fusion/functional/adapter/detail/access.hpp   (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/functional/adapter/fused.hpp   (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/functional/adapter/fused_function_object.hpp   (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/functional/adapter/fused_procedure.hpp   (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/functional/adapter/limits.hpp   (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/functional/adapter/unfused.hpp   (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/functional/adapter/unfused_typed.hpp   (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/functional/generation/
   sandbox/SOC/2009/fusion/boost/fusion/functional/generation.hpp   (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/functional/generation/detail/
   sandbox/SOC/2009/fusion/boost/fusion/functional/generation/detail/gen_make_adapter.hpp   (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/functional/generation/make_fused.hpp   (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/functional/generation/make_fused_function_object.hpp   (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/functional/generation/make_fused_procedure.hpp   (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/functional/generation/make_unfused.hpp   (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/functional/invocation/
   sandbox/SOC/2009/fusion/boost/fusion/functional/invocation.hpp   (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/functional/invocation/detail/
   sandbox/SOC/2009/fusion/boost/fusion/functional/invocation/detail/that_ptr.hpp   (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/functional/invocation/invoke.hpp   (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/functional/invocation/invoke_function_object.hpp   (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/functional/invocation/invoke_procedure.hpp   (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/functional/invocation/limits.hpp   (contents, props changed)
Added: sandbox/SOC/2009/fusion/boost/fusion/functional/adapter.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/functional/adapter.hpp	2009-07-05 11:43:45 EDT (Sun, 05 Jul 2009)
@@ -0,0 +1,16 @@
+/*=============================================================================
+    Copyright (c) 2006-2007 Tobias Schwinger
+  
+    Use modification and distribution are subject to the Boost Software 
+    License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+    http://www.boost.org/LICENSE_1_0.txt).
+==============================================================================*/
+
+#if !defined(BOOST_FUSION_FUNCTIONAL_ADAPTER_HPP_INCLUDED)
+#define BOOST_FUSION_FUNCTIONAL_ADAPTER_HPP_INCLUDED
+#include <boost/fusion/functional/adapter/fused.hpp>
+#include <boost/fusion/functional/adapter/fused_procedure.hpp>
+#include <boost/fusion/functional/adapter/fused_function_object.hpp>
+#include <boost/fusion/functional/adapter/unfused.hpp>
+#include <boost/fusion/functional/adapter/unfused_typed.hpp>
+#endif
Added: sandbox/SOC/2009/fusion/boost/fusion/functional/adapter/detail/access.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/functional/adapter/detail/access.hpp	2009-07-05 11:43:45 EDT (Sun, 05 Jul 2009)
@@ -0,0 +1,41 @@
+/*=============================================================================
+    Copyright (c) 2006-2007 Tobias Schwinger
+  
+    Use modification and distribution are subject to the Boost Software 
+    License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+    http://www.boost.org/LICENSE_1_0.txt).
+==============================================================================*/
+
+#if !defined(BOOST_FUSION_FUNCTIONAL_ADAPTER_DETAIL_ACCESS_HPP_INCLUDED)
+#define BOOST_FUSION_FUNCTIONAL_ADAPTER_DETAIL_ACCESS_HPP_INCLUDED
+
+namespace boost { namespace fusion { namespace detail
+{
+    // const reference deduction for function templates that accept T const &
+    template <typename T> struct cref               { typedef T const& type; };
+    template <typename T> struct cref<T&>           { typedef T const& type; };
+    template <typename T> struct cref<T const>      { typedef T const& type; };
+
+    // mutable reference deduction for function templates that accept T &
+    template <typename T> struct mref               { typedef T      & type; };
+    template <typename T> struct mref<T&>           { typedef T      & type; };
+
+    // generic reference deduction for function templates that are overloaded
+    // to accept both T const & and T &
+    template <typename T> struct gref               { typedef T const& type; };
+    template <typename T> struct gref<T&>           { typedef T      & type; };
+    template <typename T> struct gref<T const>      { typedef T const& type; };
+
+    // appropriately qualified target function in const context
+    template <typename T> struct qf_c          { typedef T const  type; };
+    template <typename T> struct qf_c<T const> { typedef T const  type; };
+    template <typename T> struct qf_c<T &>     { typedef T        type; };
+
+    // appropriately qualified target function in non-const context
+    template <typename T> struct qf            { typedef T        type; };
+    template <typename T> struct qf<T const>   { typedef T const  type; };
+    template <typename T> struct qf<T &>       { typedef T        type; };
+}}}
+
+#endif
+
Added: sandbox/SOC/2009/fusion/boost/fusion/functional/adapter/fused.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/functional/adapter/fused.hpp	2009-07-05 11:43:45 EDT (Sun, 05 Jul 2009)
@@ -0,0 +1,85 @@
+/*=============================================================================
+    Copyright (c) 2006-2007 Tobias Schwinger
+  
+    Use modification and distribution are subject to the Boost Software 
+    License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+    http://www.boost.org/LICENSE_1_0.txt).
+==============================================================================*/
+
+#if !defined(BOOST_FUSION_FUNCTIONAL_ADAPTER_FUSED_HPP_INCLUDED)
+#define BOOST_FUSION_FUNCTIONAL_ADAPTER_FUSED_HPP_INCLUDED
+
+#include <boost/type_traits/add_reference.hpp>
+
+#include <boost/fusion/functional/adapter/detail/access.hpp>
+#include <boost/fusion/functional/invocation/invoke.hpp>
+
+namespace boost { namespace fusion
+{
+    template <typename Function> class fused;
+
+    //----- ---- --- -- - -  -   -
+
+    template <typename Function>
+    class fused
+    {
+        Function fnc_transformed;
+
+        typedef typename detail::qf_c<Function>::type & func_const_fwd_t;
+        typedef typename detail::qf<Function>::type & func_fwd_t;
+
+    public:
+
+        inline explicit fused(func_const_fwd_t f = Function())
+            : fnc_transformed(f)
+        { }
+
+        template <class Seq> 
+        inline typename result_of::invoke<func_const_fwd_t,Seq const>::type 
+        operator()(Seq const & s) const
+        {
+            return fusion::invoke<func_const_fwd_t>(this->fnc_transformed,s);
+        }
+
+        template <class Seq> 
+        inline typename result_of::invoke<func_fwd_t,Seq const>::type 
+        operator()(Seq const & s) 
+        {
+            return fusion::invoke<func_fwd_t>(this->fnc_transformed,s);
+        }
+
+        template <class Seq> 
+        inline typename result_of::invoke<func_const_fwd_t,Seq>::type 
+        operator()(Seq & s) const
+        {
+            return fusion::invoke<func_const_fwd_t>(this->fnc_transformed,s);
+        }
+
+        template <class Seq> 
+        inline typename result_of::invoke<func_fwd_t,Seq>::type 
+        operator()(Seq & s) 
+        {
+            return fusion::invoke<func_fwd_t>(this->fnc_transformed,s);
+        }
+
+        template <typename Sig>
+        struct result;
+
+        template <class Self, class Seq>
+        struct result< Self const (Seq) >
+            : result_of::invoke<func_const_fwd_t,
+                typename boost::remove_reference<Seq>::type >
+        { };
+
+        template <class Self, class Seq>
+        struct result< Self(Seq) >
+            : result_of::invoke<func_fwd_t,
+                typename boost::remove_reference<Seq>::type >
+        { };
+
+    };
+
+}}
+
+#endif
+
Added: sandbox/SOC/2009/fusion/boost/fusion/functional/adapter/fused_function_object.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/functional/adapter/fused_function_object.hpp	2009-07-05 11:43:45 EDT (Sun, 05 Jul 2009)
@@ -0,0 +1,90 @@
+/*=============================================================================
+    Copyright (c) 2006-2007 Tobias Schwinger
+  
+    Use modification and distribution are subject to the Boost Software 
+    License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+    http://www.boost.org/LICENSE_1_0.txt).
+==============================================================================*/
+
+#if !defined(BOOST_FUSION_FUNCTIONAL_ADAPTER_FUSED_FUNCTION_OBJECT_HPP_INCLUDED)
+#define BOOST_FUSION_FUNCTIONAL_ADAPTER_FUSED_FUNCTION_OBJECT_HPP_INCLUDED
+
+#include <boost/type_traits/add_reference.hpp>
+
+#include <boost/fusion/functional/adapter/detail/access.hpp>
+#include <boost/fusion/functional/invocation/invoke_function_object.hpp>
+
+namespace boost { namespace fusion
+{
+    template <class Function> class fused_function_object;
+
+    //----- ---- --- -- - -  -   -
+
+    template <class Function>
+    class fused_function_object
+    {
+        Function fnc_transformed;
+
+        typedef typename detail::qf_c<Function>::type & func_const_fwd_t;
+        typedef typename detail::qf<Function>::type & func_fwd_t;
+
+    public:
+
+        inline explicit fused_function_object(func_const_fwd_t f = Function())
+            : fnc_transformed(f)
+        { }
+
+        template <class Seq> 
+        inline typename result_of::invoke_function_object<func_const_fwd_t,
+            Seq const>::type operator()(Seq const & s) const
+        {
+          return fusion::invoke_function_object<
+              func_const_fwd_t >(this->fnc_transformed,s);
+        }
+
+        template <class Seq> 
+        inline typename result_of::invoke_function_object<func_fwd_t,
+            Seq const>::type 
+        operator()(Seq const & s) 
+        {
+          return fusion::invoke_function_object<
+              func_fwd_t >(this->fnc_transformed,s);
+        }
+
+        template <class Seq> 
+        inline typename result_of::invoke_function_object<func_const_fwd_t,
+            Seq>::type
+        operator()(Seq & s) const
+        {
+          return fusion::invoke_function_object<
+              func_const_fwd_t >(this->fnc_transformed,s);
+        }
+
+        template <class Seq> 
+        inline typename result_of::invoke_function_object<func_fwd_t,Seq>::type
+        operator()(Seq & s) 
+        {
+          return fusion::invoke_function_object<
+              func_fwd_t >(this->fnc_transformed,s);
+        }
+
+        template <typename Sig>
+        struct result;
+
+        template <class Self, class Seq>
+        struct result< Self const (Seq) >
+            : result_of::invoke_function_object<func_const_fwd_t, 
+                typename boost::remove_reference<Seq>::type >
+        { };
+
+        template <class Self, class Seq>
+        struct result< Self(Seq) >
+            : result_of::invoke_function_object<func_fwd_t,
+                typename boost::remove_reference<Seq>::type >
+        { };
+    };
+
+}}
+
+#endif
+
Added: sandbox/SOC/2009/fusion/boost/fusion/functional/adapter/fused_procedure.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/functional/adapter/fused_procedure.hpp	2009-07-05 11:43:45 EDT (Sun, 05 Jul 2009)
@@ -0,0 +1,70 @@
+/*=============================================================================
+    Copyright (c) 2006-2007 Tobias Schwinger
+  
+    Use modification and distribution are subject to the Boost Software 
+    License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+    http://www.boost.org/LICENSE_1_0.txt).
+==============================================================================*/
+
+#if !defined(BOOST_FUSION_FUNCTIONAL_ADAPTER_FUSED_PROCEDURE_HPP_INCLUDED)
+#define BOOST_FUSION_FUNCTIONAL_ADAPTER_FUSED_PROCEDURE_HPP_INCLUDED
+
+#include <boost/type_traits/add_reference.hpp>
+
+#include <boost/fusion/functional/adapter/detail/access.hpp>
+#include <boost/fusion/functional/invocation/invoke_procedure.hpp>
+
+namespace boost { namespace fusion
+{
+    template <typename Function> class fused_procedure;
+
+    //----- ---- --- -- - -  -   -
+
+    template <typename Function>
+    class fused_procedure
+    {
+        Function fnc_transformed;
+
+        typedef typename detail::qf_c<Function>::type & func_const_fwd_t;
+        typedef typename detail::qf<Function>::type & func_fwd_t;
+
+    public:
+
+        inline explicit fused_procedure(func_const_fwd_t f = Function())
+            : fnc_transformed(f)
+        { }
+
+        template <class Seq> 
+        inline void operator()(Seq const & s) const
+        {
+            fusion::invoke_procedure<
+                func_const_fwd_t >(this->fnc_transformed,s);
+        }
+
+        template <class Seq> 
+        inline void operator()(Seq const & s) 
+        {
+            fusion::invoke_procedure<
+                func_fwd_t >(this->fnc_transformed,s);
+        }
+
+        template <class Seq> 
+        inline void operator()(Seq & s) const
+        {
+            fusion::invoke_procedure<
+                func_const_fwd_t >(this->fnc_transformed,s);
+        }
+
+        template <class Seq> 
+        inline void operator()(Seq & s) 
+        {
+            return fusion::invoke_procedure<
+                func_fwd_t >(this->fnc_transformed,s);
+        }
+
+        typedef void result_type;
+    };
+}}
+
+#endif
+
Added: sandbox/SOC/2009/fusion/boost/fusion/functional/adapter/limits.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/functional/adapter/limits.hpp	2009-07-05 11:43:45 EDT (Sun, 05 Jul 2009)
@@ -0,0 +1,26 @@
+/*=============================================================================
+    Copyright (c) 2006-2007 Tobias Schwinger
+  
+    Use modification and distribution are subject to the Boost Software 
+    License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+    http://www.boost.org/LICENSE_1_0.txt).
+==============================================================================*/
+
+#if !defined(BOOST_FUSION_FUNCTIONAL_ADAPTER_LIMITS_HPP_INCLUDED)
+#   define BOOST_FUSION_FUNCTIONAL_ADAPTER_LIMITS_HPP_INCLUDED
+
+#   include <boost/fusion/container/vector/limits.hpp>
+
+#   if !defined(BOOST_FUSION_UNFUSED_MAX_ARITY)
+#       define BOOST_FUSION_UNFUSED_MAX_ARITY 6
+#   elif BOOST_FUSION_UNFUSED_GENERIC_MAX_ARITY > FUSION_MAX_VECTOR_SIZE
+#       error "BOOST_FUSION_UNFUSED_GENERIC_MAX_ARITY > FUSION_MAX_VECTOR_SIZE"
+#   endif
+#   if !defined(BOOST_FUSION_UNFUSED_TYPED_MAX_ARITY)
+#       define BOOST_FUSION_UNFUSED_TYPED_MAX_ARITY 6
+#   elif BOOST_FUSION_UNFUSED_TYPED_MAX_ARITY > FUSION_MAX_VECTOR_SIZE
+#       error "BOOST_FUSION_UNFUSED_TYPED_MAX_ARITY > FUSION_MAX_VECTOR_SIZE"
+#   endif
+
+#endif
+
Added: sandbox/SOC/2009/fusion/boost/fusion/functional/adapter/unfused.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/functional/adapter/unfused.hpp	2009-07-05 11:43:45 EDT (Sun, 05 Jul 2009)
@@ -0,0 +1,151 @@
+/*=============================================================================
+    Copyright (c) 2006-2007 Tobias Schwinger
+  
+    Use modification and distribution are subject to the Boost Software 
+    License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+    http://www.boost.org/LICENSE_1_0.txt).
+==============================================================================*/
+
+#if !defined(BOOST_FUSION_FUNCTIONAL_ADAPTER_UNFUSED_HPP_INCLUDED)
+#if !defined(BOOST_PP_IS_ITERATING)
+
+#include <boost/preprocessor/cat.hpp>
+#include <boost/preprocessor/iteration/iterate.hpp>
+#include <boost/preprocessor/repetition/enum_params.hpp>
+#include <boost/preprocessor/repetition/enum_binary_params.hpp>
+#include <boost/preprocessor/facilities/intercept.hpp>
+
+#include <boost/utility/result_of.hpp>
+
+#include <boost/fusion/container/vector/vector.hpp>
+
+#include <boost/fusion/functional/adapter/limits.hpp>
+#include <boost/fusion/functional/adapter/detail/access.hpp>
+
+namespace boost { namespace fusion
+{
+    template <class Function, bool AllowNullary = true>
+    class unfused;
+
+    //----- ---- --- -- - -  -   -
+
+    template <class Function> 
+    class unfused<Function,true>
+      : public unfused<Function,false>
+    {
+        typedef typename detail::qf_c<Function>::type function_c;
+        typedef typename detail::qf<Function>::type function;
+        typedef typename detail::call_param<Function>::type func_const_fwd_t;
+      public:
+
+        using unfused<Function,false>::operator();
+
+        inline explicit unfused(func_const_fwd_t f = function())
+            : unfused<Function,false>(f)
+        { }
+
+        typedef typename boost::result_of<
+            function_c(fusion::vector0<> &) >::type call_const_0_result;
+
+        inline call_const_0_result operator()() const
+        {
+            fusion::vector0<> arg;
+            return this->fnc_transformed(arg);
+        }
+
+        typedef typename boost::result_of< 
+            function(fusion::vector0<> &) >::type call_0_result;
+
+        inline call_0_result operator()() 
+        {
+            fusion::vector0<> arg;
+            return this->fnc_transformed(arg);
+        }
+    };
+
+    template <class Function> class unfused<Function,false>
+    {
+      protected:
+        Function fnc_transformed;
+        typedef typename detail::qf_c<Function>::type function_c;
+        typedef typename detail::qf<Function>::type function;
+        typedef typename detail::call_param<Function>::type func_const_fwd_t;
+      public:
+
+        inline explicit unfused(func_const_fwd_t f = function())
+            : fnc_transformed(f)
+        { }
+
+        template <typename Sig>
+        struct result;
+
+        #define  BOOST_PP_FILENAME_1 \
+            <boost/fusion/functional/adapter/unfused.hpp>
+        #define  BOOST_PP_ITERATION_LIMITS \
+            (1,BOOST_FUSION_UNFUSED_MAX_ARITY)
+        #include BOOST_PP_ITERATE()
+    };
+}}
+
+namespace boost 
+{
+    template<class F>
+    struct result_of< boost::fusion::unfused<F> const () >
+    {
+        typedef typename boost::fusion::unfused<F>::call_const_0_result type;
+    };
+    template<class F>
+    struct result_of< boost::fusion::unfused<F>() >
+    {
+        typedef typename boost::fusion::unfused<F>::call_0_result type;
+    };
+}
+
+#define BOOST_FUSION_FUNCTIONAL_ADAPTER_UNFUSED_HPP_INCLUDED
+#else // defined(BOOST_PP_IS_ITERATING)
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Preprocessor vertical repetition code
+//
+////////////////////////////////////////////////////////////////////////////////
+#define N BOOST_PP_ITERATION()
+
+        template <class Self, BOOST_PP_ENUM_PARAMS(N,typename T)>
+        struct result< Self const (BOOST_PP_ENUM_PARAMS(N,T)) >
+            : boost::result_of< function_c(
+                BOOST_PP_CAT(fusion::vector,N)< BOOST_PP_ENUM_BINARY_PARAMS(N,
+                    typename detail::mref<T,>::type BOOST_PP_INTERCEPT) > & )>
+        { };
+
+        template <class Self, BOOST_PP_ENUM_PARAMS(N,typename T)>
+        struct result< Self(BOOST_PP_ENUM_PARAMS(N,T)) >
+            : boost::result_of< function(
+                BOOST_PP_CAT(fusion::vector,N)< BOOST_PP_ENUM_BINARY_PARAMS(N,
+                    typename detail::mref<T,>::type BOOST_PP_INTERCEPT) > & )>
+        { };
+
+        template <BOOST_PP_ENUM_PARAMS(N,typename T)>
+        inline typename boost::result_of<function_c(BOOST_PP_CAT(fusion::vector,N)
+            <BOOST_PP_ENUM_BINARY_PARAMS(N,T,& BOOST_PP_INTERCEPT)> & )>::type
+        operator()(BOOST_PP_ENUM_BINARY_PARAMS(N,T,& a)) const
+        {
+            BOOST_PP_CAT(fusion::vector,N)<
+                  BOOST_PP_ENUM_BINARY_PARAMS(N,T,& BOOST_PP_INTERCEPT) >
+                arg(BOOST_PP_ENUM_PARAMS(N,a));
+            return this->fnc_transformed(arg);
+        }
+
+        template <BOOST_PP_ENUM_PARAMS(N,typename T)>
+        inline typename boost::result_of<function(BOOST_PP_CAT(fusion::vector,N)
+            <BOOST_PP_ENUM_BINARY_PARAMS(N,T,& BOOST_PP_INTERCEPT)> & )>::type
+        operator()(BOOST_PP_ENUM_BINARY_PARAMS(N,T,& a)) 
+        {
+            BOOST_PP_CAT(fusion::vector,N)<
+                  BOOST_PP_ENUM_BINARY_PARAMS(N,T,& BOOST_PP_INTERCEPT) >
+                arg(BOOST_PP_ENUM_PARAMS(N,a));
+            return this->fnc_transformed(arg);
+        }
+#undef N
+#endif // defined(BOOST_PP_IS_ITERATING)
+#endif
+
Added: sandbox/SOC/2009/fusion/boost/fusion/functional/adapter/unfused_typed.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/functional/adapter/unfused_typed.hpp	2009-07-05 11:43:45 EDT (Sun, 05 Jul 2009)
@@ -0,0 +1,155 @@
+/*=============================================================================
+    Copyright (c) 2006-2007 Tobias Schwinger
+  
+    Use modification and distribution are subject to the Boost Software 
+    License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+    http://www.boost.org/LICENSE_1_0.txt).
+==============================================================================*/
+
+#if !defined(BOOST_FUSION_FUNCTIONAL_ADAPTER_UNFUSED_TYPED_HPP_INCLUDED)
+#if !defined(BOOST_PP_IS_ITERATING)
+
+#include <boost/preprocessor/cat.hpp>
+#include <boost/preprocessor/iteration/iterate.hpp>
+#include <boost/preprocessor/repetition/enum.hpp>
+#include <boost/preprocessor/repetition/enum_params.hpp>
+#include <boost/preprocessor/repetition/enum_trailing_params.hpp>
+
+#include <boost/config.hpp>
+
+#include <boost/utility/result_of.hpp>
+
+#include <boost/fusion/support/detail/access.hpp>
+#include <boost/fusion/sequence/intrinsic/value_at.hpp>
+#include <boost/fusion/sequence/intrinsic/size.hpp>
+#include <boost/fusion/container/vector/vector.hpp>
+#include <boost/fusion/container/vector/convert.hpp>
+
+#include <boost/fusion/functional/adapter/limits.hpp>
+#include <boost/fusion/functional/adapter/detail/access.hpp>
+
+
+namespace boost { namespace fusion
+{
+
+    template <class Function, class Sequence> class unfused_typed;
+
+    //----- ---- --- -- - -  -   -
+
+    namespace detail
+    {
+        template <class Derived, class Function, 
+            class Sequence, long Arity>
+        struct unfused_typed_impl;
+    }
+
+    template <class Function, class Sequence>
+    class unfused_typed
+        : public detail::unfused_typed_impl
+          < unfused_typed<Function,Sequence>, Function, Sequence, 
+            result_of::size<Sequence>::value > 
+    {
+        Function fnc_transformed;
+
+        template <class D, class F, class S, long A>
+        friend struct detail::unfused_typed_impl;
+
+        typedef typename detail::call_param<Function>::type func_const_fwd_t;
+
+    public:
+
+        inline explicit unfused_typed(func_const_fwd_t f = Function())
+            : fnc_transformed(f)
+        { }
+    }; 
+
+    #define  BOOST_PP_FILENAME_1 <boost/fusion/functional/adapter/unfused_typed.hpp>
+    #define  BOOST_PP_ITERATION_LIMITS (0,BOOST_FUSION_UNFUSED_TYPED_MAX_ARITY)
+    #include BOOST_PP_ITERATE() 
+
+}}
+
+namespace boost 
+{
+    template<class F, class Seq>
+    struct result_of< boost::fusion::unfused_typed<F,Seq> const () >
+        : boost::fusion::unfused_typed<F,Seq>::template result< 
+            boost::fusion::unfused_typed<F,Seq> const () >
+    { };
+    template<class F, class Seq>
+    struct result_of< boost::fusion::unfused_typed<F,Seq>() >
+        : boost::fusion::unfused_typed<F,Seq>::template result< 
+            boost::fusion::unfused_typed<F,Seq> () >
+    { };
+}
+
+
+#define BOOST_FUSION_FUNCTIONAL_ADAPTER_UNFUSED_TYPED_HPP_INCLUDED
+#else // defined(BOOST_PP_IS_ITERATING)
+///////////////////////////////////////////////////////////////////////////////
+//
+//  Preprocessor vertical repetition code
+//
+///////////////////////////////////////////////////////////////////////////////
+#define N BOOST_PP_ITERATION()
+
+    namespace detail
+    {
+
+        template <class Derived, class Function, class Sequence>
+        struct unfused_typed_impl<Derived,Function,Sequence,N>
+        {
+            typedef typename detail::qf_c<Function>::type function_c;
+            typedef typename detail::qf<Function>::type function;
+            typedef typename result_of::as_vector<Sequence>::type arg_vector_t;
+
+        public:
+
+#define M(z,i,s)                                                                \
+    typename call_param<typename result_of::value_at_c<s,i>::type>::type a##i
+
+            inline typename boost::result_of< 
+                function_c(arg_vector_t &) >::type
+            operator()(BOOST_PP_ENUM(N,M,arg_vector_t)) const
+            {
+#if N > 0
+                arg_vector_t arg(BOOST_PP_ENUM_PARAMS(N,a));
+#else
+                arg_vector_t arg;
+#endif
+                return static_cast<Derived const *>(this)->fnc_transformed(arg);
+            }
+
+            inline typename boost::result_of<
+                function(arg_vector_t &) >::type 
+            operator()(BOOST_PP_ENUM(N,M,arg_vector_t)) 
+            {
+#if N > 0
+                arg_vector_t arg(BOOST_PP_ENUM_PARAMS(N,a));
+#else
+                arg_vector_t arg;
+#endif
+                return static_cast<Derived *>(this)->fnc_transformed(arg);
+            }
+
+#undef M
+
+            template <typename Sig> struct result { typedef void type; };
+
+            template <class Self BOOST_PP_ENUM_TRAILING_PARAMS(N,typename T)>
+            struct result< Self const (BOOST_PP_ENUM_PARAMS(N,T)) >
+                : boost::result_of< function_c(arg_vector_t &) > 
+            { };
+
+            template <class Self BOOST_PP_ENUM_TRAILING_PARAMS(N,typename T)>
+            struct result< Self (BOOST_PP_ENUM_PARAMS(N,T)) >
+                : boost::result_of< function(arg_vector_t &) >
+            { };
+        };
+
+    } // namespace detail
+
+#undef N
+#endif // defined(BOOST_PP_IS_ITERATING)
+#endif
+
Added: sandbox/SOC/2009/fusion/boost/fusion/functional/generation.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/functional/generation.hpp	2009-07-05 11:43:45 EDT (Sun, 05 Jul 2009)
@@ -0,0 +1,17 @@
+/*=============================================================================
+    Copyright (c) 2007 Tobias Schwinger
+  
+    Use modification and distribution are subject to the Boost Software 
+    License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+    http://www.boost.org/LICENSE_1_0.txt).
+==============================================================================*/
+
+#if !defined(BOOST_FUSION_FUNCTIONAL_GENERATION_HPP_INCLUDED)
+#define BOOST_FUSION_FUNCTIONAL_GENERATION_HPP_INCLUDED
+
+#include <boost/fusion/functional/generation/make_fused.hpp>
+#include <boost/fusion/functional/generation/make_fused_procedure.hpp>
+#include <boost/fusion/functional/generation/make_fused_function_object.hpp>
+#include <boost/fusion/functional/generation/make_unfused.hpp>
+
+#endif
Added: sandbox/SOC/2009/fusion/boost/fusion/functional/generation/detail/gen_make_adapter.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/functional/generation/detail/gen_make_adapter.hpp	2009-07-05 11:43:45 EDT (Sun, 05 Jul 2009)
@@ -0,0 +1,44 @@
+/*=============================================================================
+    Copyright (c) 2007 Tobias Schwinger
+  
+    Use modification and distribution are subject to the Boost Software 
+    License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+    http://www.boost.org/LICENSE_1_0.txt).
+==============================================================================*/
+
+// No include guard - this file is included multiple times intentionally.
+
+#include <boost/preprocessor/cat.hpp>
+#include <boost/fusion/support/detail/as_fusion_element.hpp>
+
+#if !defined(BOOST_FUSION_CLASS_TPL_NAME)
+#   error "BOOST_FUSION_CLASS_TPL_NAME undefined"
+#endif
+
+#define BOOST_FUSION_FUNC_NAME BOOST_PP_CAT(make_,BOOST_FUSION_CLASS_TPL_NAME)
+
+namespace boost { namespace fusion
+{
+
+    namespace result_of
+    {
+        template <typename F>
+        struct BOOST_FUSION_FUNC_NAME
+        {
+            typedef fusion::BOOST_FUSION_CLASS_TPL_NAME< 
+                typename fusion::detail::as_fusion_element<F>::type > type;
+        };
+    }
+
+    template <typename F>
+    inline typename result_of::BOOST_FUSION_FUNC_NAME<F>::type
+    BOOST_FUSION_FUNC_NAME(F const & f)
+    {
+        return typename result_of::BOOST_FUSION_FUNC_NAME<F>::type(f);
+    }
+
+}}
+
+#undef BOOST_FUSION_CLASS_TPL_NAME
+#undef BOOST_FUSION_FUNC_NAME
+
Added: sandbox/SOC/2009/fusion/boost/fusion/functional/generation/make_fused.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/functional/generation/make_fused.hpp	2009-07-05 11:43:45 EDT (Sun, 05 Jul 2009)
@@ -0,0 +1,18 @@
+/*=============================================================================
+    Copyright (c) 2007 Tobias Schwinger
+  
+    Use modification and distribution are subject to the Boost Software 
+    License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+    http://www.boost.org/LICENSE_1_0.txt).
+==============================================================================*/
+
+#if !defined(BOOST_FUSION_FUNCTIONAL_GENERATION_MAKE_FUSED_HPP_INCLUDED)
+#define BOOST_FUSION_FUNCTIONAL_GENERATION_MAKE_FUSED_HPP_INCLUDED
+
+#include <boost/fusion/functional/adapter/fused.hpp>
+
+#define BOOST_FUSION_CLASS_TPL_NAME fused
+#include <boost/fusion/functional/generation/detail/gen_make_adapter.hpp>
+
+#endif
+
Added: sandbox/SOC/2009/fusion/boost/fusion/functional/generation/make_fused_function_object.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/functional/generation/make_fused_function_object.hpp	2009-07-05 11:43:45 EDT (Sun, 05 Jul 2009)
@@ -0,0 +1,18 @@
+/*=============================================================================
+    Copyright (c) 2007 Tobias Schwinger
+  
+    Use modification and distribution are subject to the Boost Software 
+    License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+    http://www.boost.org/LICENSE_1_0.txt).
+==============================================================================*/
+
+#if !defined(BOOST_FUSION_FUNCTIONAL_GENERATION_MAKE_FUSED_FUNCTION_OBJECT_HPP_INCLUDED)
+#define BOOST_FUSION_FUNCTIONAL_GENERATION_MAKE_FUSED_FUNCTION_OBJECT_HPP_INCLUDED
+
+#include <boost/fusion/functional/adapter/fused_function_object.hpp>
+
+#define BOOST_FUSION_CLASS_TPL_NAME fused_function_object
+#include <boost/fusion/functional/generation/detail/gen_make_adapter.hpp>
+
+#endif
+
Added: sandbox/SOC/2009/fusion/boost/fusion/functional/generation/make_fused_procedure.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/functional/generation/make_fused_procedure.hpp	2009-07-05 11:43:45 EDT (Sun, 05 Jul 2009)
@@ -0,0 +1,18 @@
+/*=============================================================================
+    Copyright (c) 2007 Tobias Schwinger
+  
+    Use modification and distribution are subject to the Boost Software 
+    License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+    http://www.boost.org/LICENSE_1_0.txt).
+==============================================================================*/
+
+#if !defined(BOOST_FUSION_FUNCTIONAL_GENERATION_MAKE_FUSED_PROCEDURE_HPP_INCLUDED)
+#define BOOST_FUSION_FUNCTIONAL_GENERATION_MAKE_FUSED_PROCEDURE_HPP_INCLUDED
+
+#include <boost/fusion/functional/adapter/fused_procedure.hpp>
+
+#define BOOST_FUSION_CLASS_TPL_NAME fused_procedure
+#include <boost/fusion/functional/generation/detail/gen_make_adapter.hpp>
+
+#endif
+
Added: sandbox/SOC/2009/fusion/boost/fusion/functional/generation/make_unfused.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/functional/generation/make_unfused.hpp	2009-07-05 11:43:45 EDT (Sun, 05 Jul 2009)
@@ -0,0 +1,18 @@
+/*=============================================================================
+    Copyright (c) 2007 Tobias Schwinger
+  
+    Use modification and distribution are subject to the Boost Software 
+    License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+    http://www.boost.org/LICENSE_1_0.txt).
+==============================================================================*/
+
+#if !defined(BOOST_FUSION_FUNCTIONAL_GENERATION_MAKE_UNFUSED_HPP_INCLUDED)
+#define BOOST_FUSION_FUNCTIONAL_GENERATION_MAKE_UNFUSED_HPP_INCLUDED
+
+#include <boost/fusion/functional/adapter/unfused.hpp>
+
+#define BOOST_FUSION_CLASS_TPL_NAME unfused
+#include <boost/fusion/functional/generation/detail/gen_make_adapter.hpp>
+
+#endif
+
Added: sandbox/SOC/2009/fusion/boost/fusion/functional/invocation.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/functional/invocation.hpp	2009-07-05 11:43:45 EDT (Sun, 05 Jul 2009)
@@ -0,0 +1,16 @@
+/*=============================================================================
+    Copyright (c) 2006-2007 Tobias Schwinger
+  
+    Use modification and distribution are subject to the Boost Software 
+    License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+    http://www.boost.org/LICENSE_1_0.txt).
+==============================================================================*/
+
+#if !defined(BOOST_FUSION_FUNCTIONAL_INVOCATION_HPP_INCLUDED)
+#define BOOST_FUSION_FUNCTIONAL_INVOCATION_HPP_INCLUDED
+
+#include <boost/fusion/functional/invocation/invoke.hpp>
+#include <boost/fusion/functional/invocation/invoke_procedure.hpp>
+#include <boost/fusion/functional/invocation/invoke_function_object.hpp>
+
+#endif
Added: sandbox/SOC/2009/fusion/boost/fusion/functional/invocation/detail/that_ptr.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/functional/invocation/detail/that_ptr.hpp	2009-07-05 11:43:45 EDT (Sun, 05 Jul 2009)
@@ -0,0 +1,87 @@
+/*=============================================================================
+    Copyright (c) 2006-2007 Tobias Schwinger
+  
+    Use modification and distribution are subject to the Boost Software 
+    License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+    http://www.boost.org/LICENSE_1_0.txt).
+==============================================================================*/
+
+#if !defined(BOOST_FUSION_FUNCTIONAL_INVOCATION_DETAIL_THAT_PTR_HPP_INCLUDED)
+#define BOOST_FUSION_FUNCTIONAL_INVOCATION_DETAIL_THAT_PTR_HPP_INCLUDED
+
+#include <boost/get_pointer.hpp>
+#include <boost/utility/addressof.hpp>
+#include <boost/type_traits/config.hpp>
+#include <boost/type_traits/remove_reference.hpp>
+
+namespace boost { namespace fusion { namespace detail
+{
+    template <typename Wanted>
+    struct that_ptr
+    {
+      private:
+
+        typedef typename remove_reference<Wanted>::type pointee;
+
+        template <typename T> 
+        static inline pointee * do_get_pointer(T &, pointee * x) 
+        {
+            return x;
+        }
+        template <typename T> 
+        static inline pointee * do_get_pointer(T & x, void const *) 
+        {
+            return get_pointer(x); 
+        }
+
+      public:
+
+        static inline pointee * get(pointee * x)
+        {
+            return x; 
+        }
+
+        static inline pointee * get(pointee & x)
+        {
+            return boost::addressof(x); 
+        }
+
+        template <typename T> static inline pointee * get(T & x)
+        {
+            return do_get_pointer(x, boost::addressof(x)); 
+        }
+    };
+
+    template <typename PtrOrSmartPtr> struct non_const_pointee;
+
+    namespace adl_barrier
+    {
+        using boost::get_pointer;
+        void const * BOOST_TT_DECL get_pointer(...); // fallback
+  
+        template< typename T> char const_tester(T *);
+        template< typename T> long const_tester(T const *);
+
+        template <typename Ptr>
+        struct non_const_pointee_impl
+        {
+            static Ptr & what;
+
+            static bool const value =
+                sizeof(const_tester(get_pointer(what))) == 1;
+        };
+    }
+
+    template <typename PtrOrSmartPtr> struct non_const_pointee
+        : adl_barrier::non_const_pointee_impl< 
+              typename remove_cv<
+                  typename remove_reference<PtrOrSmartPtr>::type >::type >
+    {
+        typedef non_const_pointee type;
+        typedef bool value_type;
+    };
+
+}}}
+
+#endif
+
Added: sandbox/SOC/2009/fusion/boost/fusion/functional/invocation/invoke.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/functional/invocation/invoke.hpp	2009-07-05 11:43:45 EDT (Sun, 05 Jul 2009)
@@ -0,0 +1,306 @@
+/*=============================================================================
+    Copyright (c) 2005-2006 Joao Abecasis
+    Copyright (c) 2006-2007 Tobias Schwinger
+
+    Use modification and distribution are subject to the Boost Software
+    License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+    http://www.boost.org/LICENSE_1_0.txt).
+==============================================================================*/
+
+#if !defined(BOOST_FUSION_FUNCTIONAL_INVOCATION_INVOKE_HPP_INCLUDED)
+#if !defined(BOOST_PP_IS_ITERATING)
+
+#include <boost/preprocessor/cat.hpp>
+#include <boost/preprocessor/iteration/iterate.hpp>
+#include <boost/preprocessor/arithmetic/dec.hpp>
+#include <boost/preprocessor/repetition/repeat_from_to.hpp>
+#include <boost/preprocessor/repetition/enum.hpp>
+#include <boost/preprocessor/repetition/enum_shifted.hpp>
+#include <boost/preprocessor/repetition/enum_params.hpp>
+#include <boost/preprocessor/repetition/enum_shifted_params.hpp>
+
+#include <boost/mpl/if.hpp>
+#include <boost/mpl/eval_if.hpp>
+#include <boost/mpl/or.hpp>
+#include <boost/mpl/front.hpp>
+#include <boost/mpl/identity.hpp>
+
+#include <boost/type_traits/add_const.hpp>
+#include <boost/type_traits/remove_cv.hpp>
+#include <boost/type_traits/add_reference.hpp>
+#include <boost/type_traits/remove_reference.hpp>
+#include <boost/type_traits/is_convertible.hpp>
+
+#include <boost/function_types/is_function.hpp>
+#include <boost/function_types/is_callable_builtin.hpp>
+#include <boost/function_types/is_member_pointer.hpp>
+#include <boost/function_types/is_member_function_pointer.hpp>
+#include <boost/function_types/result_type.hpp>
+#include <boost/function_types/parameter_types.hpp>
+
+#include <boost/utility/result_of.hpp>
+
+#include <boost/fusion/support/category_of.hpp>
+#include <boost/fusion/sequence/intrinsic/at.hpp>
+#include <boost/fusion/sequence/intrinsic/size.hpp>
+#include <boost/fusion/sequence/intrinsic/front.hpp>
+#include <boost/fusion/sequence/intrinsic/begin.hpp>
+#include <boost/fusion/iterator/next.hpp>
+#include <boost/fusion/iterator/deref.hpp>
+#include <boost/fusion/functional/invocation/limits.hpp>
+#include <boost/fusion/functional/invocation/detail/that_ptr.hpp>
+
+namespace boost { namespace fusion
+{
+    namespace result_of
+    {
+        template <typename Function, class Sequence> struct invoke;
+    }
+
+    template <typename Function, class Sequence>
+    inline typename result_of::invoke<Function, Sequence>::type
+    invoke(Function, Sequence &);
+
+    template <typename Function, class Sequence>
+    inline typename result_of::invoke<Function, Sequence const>::type
+    invoke(Function, Sequence const &);
+
+    //----- ---- --- -- - -  -   -
+
+    namespace detail
+    {
+        namespace ft = function_types;
+
+        template<
+            typename Function, class Sequence,
+            int N = result_of::size<Sequence>::value,
+            bool CBI = ft::is_callable_builtin<Function>::value,
+            bool RandomAccess = traits::is_random_access<Sequence>::value
+            >
+        struct invoke_impl;
+
+        template <class Sequence, int N>
+        struct invoke_param_types;
+
+        template <typename T, class Sequence>
+        struct invoke_data_member;
+
+        template <typename Function, class Sequence, int N, bool RandomAccess>
+        struct invoke_mem_fn;
+
+        #define  BOOST_PP_FILENAME_1 <boost/fusion/functional/invocation/invoke.hpp>
+        #define  BOOST_PP_ITERATION_LIMITS (0, BOOST_FUSION_INVOKE_MAX_ARITY)
+        #include BOOST_PP_ITERATE()
+
+        template <typename F, class Sequence, int N, bool RandomAccess>
+        struct invoke_nonmember_builtin
+        // use same implementation as for function objects but...
+            : invoke_impl< // ...work around boost::result_of bugs
+                typename mpl::eval_if< ft::is_function<F>,
+                    boost::add_reference<F>, boost::remove_cv<F> >::type,
+                Sequence, N, false, RandomAccess >
+        { };
+
+        template <typename Function, class Sequence, int N, bool RandomAccess>
+        struct invoke_impl<Function,Sequence,N,true,RandomAccess>
+            : mpl::if_< ft::is_member_function_pointer<Function>,
+                invoke_mem_fn<Function,Sequence,N,RandomAccess>,
+                invoke_nonmember_builtin<Function,Sequence,N,RandomAccess>
+            >::type
+        { };
+
+        template <typename Function, class Sequence, bool RandomAccess>
+        struct invoke_impl<Function,Sequence,1,true,RandomAccess>
+            : mpl::eval_if< ft::is_member_pointer<Function>,
+                mpl::if_< ft::is_member_function_pointer<Function>,
+                    invoke_mem_fn<Function,Sequence,1,RandomAccess>,
+                    invoke_data_member<Function, Sequence> >,
+                mpl::identity< invoke_nonmember_builtin<
+                    Function,Sequence,1,RandomAccess> >
+            >::type
+        { };
+
+        template <typename T, class C, class Sequence>
+        struct invoke_data_member< T C::*, Sequence >
+        {
+        private:
+
+            typedef typename result_of::front<Sequence>::type that;
+
+            typedef mpl::or_< boost::is_convertible<that,C*>,
+                              boost::is_convertible<that,C&>,
+                              non_const_pointee<that> > non_const_cond;
+
+            typedef typename mpl::eval_if< non_const_cond,
+                mpl::identity<C>, add_const<C> >::type qualified_class;
+
+            typedef typename mpl::eval_if< non_const_cond,
+                mpl::identity<T>, add_const<T> >::type qualified_type;
+
+        public:
+
+            typedef typename boost::add_reference<qualified_type>::type
+                result_type;
+
+            static inline result_type call(T C::* f, Sequence & s)
+            {
+                typename result_of::front<Sequence>::type c = fusion::front(s);
+                return that_ptr<qualified_class>::get(c)->*f;
+            }
+        };
+    }
+
+    namespace result_of
+    {
+        template <typename Function, class Sequence> struct invoke
+        {
+            typedef typename detail::invoke_impl<
+                typename boost::remove_reference<Function>::type, Sequence
+              >::result_type type;
+        };
+    }
+
+    template <typename Function, class Sequence>
+    inline typename result_of::invoke<Function,Sequence>::type
+    invoke(Function f, Sequence & s)
+    {
+        return detail::invoke_impl<
+                typename boost::remove_reference<Function>::type,Sequence
+            >::call(f,s);
+    }
+
+    template <typename Function, class Sequence>
+    inline typename result_of::invoke<Function,Sequence const>::type
+    invoke(Function f, Sequence const & s)
+    {
+        return detail::invoke_impl<
+                typename boost::remove_reference<Function>::type,Sequence const
+            >::call(f,s);
+    }
+
+}}
+
+#define BOOST_FUSION_FUNCTIONAL_INVOCATION_INVOKE_HPP_INCLUDED
+#else // defined(BOOST_PP_IS_ITERATING)
+///////////////////////////////////////////////////////////////////////////////
+//
+//  Preprocessor vertical repetition code
+//
+///////////////////////////////////////////////////////////////////////////////
+#define N BOOST_PP_ITERATION()
+
+        template <typename Function, class Sequence>
+        struct invoke_impl<Function,Sequence,N,false,true>
+        {
+        public:
+
+            typedef typename boost::result_of<
+#define M(z,j,data) typename result_of::at_c<Sequence,j>::type
+                    Function(BOOST_PP_ENUM(N,M,~)) >::type result_type;
+#undef M
+
+            template <typename F>
+            static inline result_type
+            call(F & f, Sequence & s)
+            {
+#define M(z,j,data) fusion::at_c<j>(s)
+                return f( BOOST_PP_ENUM(N,M,~) );
+            }
+        };
+
+
+#if N > 0
+        template <typename Function, class Sequence>
+        struct invoke_mem_fn<Function,Sequence,N,true>
+        {
+        public:
+
+            typedef typename ft::result_type<Function>::type result_type;
+
+            template <typename F>
+            static inline result_type
+            call(F & f, Sequence & s)
+            {
+                return (that_ptr<typename mpl::front<
+                                ft::parameter_types<Function> >::type
+                    >::get(fusion::at_c<0>(s))->*f)(BOOST_PP_ENUM_SHIFTED(N,M,~));
+            }
+        };
+#endif
+
+#undef M
+
+#define M(z,j,data)                                                             \
+            typename seq::I##j i##j =                                          \
+                fusion::next(BOOST_PP_CAT(i,BOOST_PP_DEC(j)));
+
+        template <typename Function, class Sequence>
+        struct invoke_impl<Function,Sequence,N,false,false>
+        {
+        private:
+            typedef invoke_param_types<Sequence,N> seq;
+        public:
+
+            typedef typename boost::result_of<
+                Function(BOOST_PP_ENUM_PARAMS(N,typename seq::T))
+                >::type result_type;
+
+            template <typename F>
+            static inline result_type
+            call(F & f, Sequence & s)
+            {
+#if N > 0
+                typename seq::I0 i0 = fusion::begin(s);
+                BOOST_PP_REPEAT_FROM_TO(1,N,M,~)
+#endif
+                return f( BOOST_PP_ENUM_PARAMS(N,*i) );
+            }
+        };
+
+#if N > 0
+        template <typename Function, class Sequence>
+        struct invoke_mem_fn<Function,Sequence,N,false>
+        {
+        private:
+            typedef invoke_param_types<Sequence,N> seq;
+        public:
+
+            typedef typename ft::result_type<Function>::type result_type;
+
+            template <typename F>
+            static inline result_type
+            call(F & f, Sequence & s)
+            {
+                typename seq::I0 i0 = fusion::begin(s);
+                BOOST_PP_REPEAT_FROM_TO(1,N,M,~)
+
+                return (that_ptr< typename mpl::front<
+                                      ft::parameter_types<Function> >::type
+                    >::get(*i0)->*f)(BOOST_PP_ENUM_SHIFTED_PARAMS(N,*i));
+            }
+        };
+#endif
+
+#undef M
+
+        template <class Sequence> struct invoke_param_types<Sequence,N>
+        {
+#if N > 0
+            typedef typename result_of::begin<Sequence>::type I0;
+            typedef typename result_of::deref<I0>::type T0;
+
+#define M(z,i,data)                                                             \
+            typedef typename result_of::next<                                  \
+                BOOST_PP_CAT(I,BOOST_PP_DEC(i))>::type I##i;                   \
+            typedef typename result_of::deref<I##i>::type T##i;
+
+            BOOST_PP_REPEAT_FROM_TO(1,N,M,~)
+#undef M
+#endif
+        };
+
+
+#undef N
+#endif // defined(BOOST_PP_IS_ITERATING)
+#endif
+
Added: sandbox/SOC/2009/fusion/boost/fusion/functional/invocation/invoke_function_object.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/functional/invocation/invoke_function_object.hpp	2009-07-05 11:43:45 EDT (Sun, 05 Jul 2009)
@@ -0,0 +1,177 @@
+/*=============================================================================
+    Copyright (c) 2005-2006 Joao Abecasis
+    Copyright (c) 2006-2007 Tobias Schwinger
+
+    Use modification and distribution are subject to the Boost Software
+    License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+    http://www.boost.org/LICENSE_1_0.txt).
+==============================================================================*/
+
+#if !defined(BOOST_FUSION_FUNCTIONAL_INVOCATION_INVOKE_FUNCTION_OBJECT_HPP_INCLUDED)
+#if !defined(BOOST_PP_IS_ITERATING)
+
+#include <boost/preprocessor/cat.hpp>
+#include <boost/preprocessor/iteration/iterate.hpp>
+#include <boost/preprocessor/arithmetic/dec.hpp>
+#include <boost/preprocessor/repetition/repeat_from_to.hpp>
+#include <boost/preprocessor/repetition/enum.hpp>
+#include <boost/preprocessor/repetition/enum_params.hpp>
+
+#include <boost/utility/result_of.hpp>
+
+#include <boost/type_traits/remove_reference.hpp>
+#include <boost/type_traits/remove_const.hpp>
+
+#include <boost/utility/result_of.hpp>
+
+#include <boost/fusion/support/category_of.hpp>
+#include <boost/fusion/sequence/intrinsic/size.hpp>
+#include <boost/fusion/sequence/intrinsic/at.hpp>
+#include <boost/fusion/sequence/intrinsic/begin.hpp>
+#include <boost/fusion/iterator/next.hpp>
+#include <boost/fusion/iterator/deref.hpp>
+#include <boost/fusion/functional/invocation/limits.hpp>
+
+namespace boost { namespace fusion
+{
+    namespace result_of
+    {
+        template <class Function, class Sequence> struct invoke_function_object;
+    }
+
+    template <class Function, class Sequence>
+    inline typename result_of::invoke_function_object<Function, Sequence>::type
+    invoke_function_object(Function, Sequence &);
+
+    template <class Function, class Sequence>
+    inline typename result_of::invoke_function_object<Function, Sequence const
+        >::type invoke_function_object(Function, Sequence const &);
+
+    //----- ---- --- -- - -  -   -
+
+    namespace detail
+    {
+        template<
+            class Function, class Sequence,
+            int N = result_of::size<Sequence>::value,
+            bool RandomAccess = traits::is_random_access<Sequence>::value
+            >
+        struct invoke_function_object_impl;
+
+        template <class Sequence, int N>
+        struct invoke_function_object_param_types;
+
+        #define  BOOST_PP_FILENAME_1 \
+            <boost/fusion/functional/invocation/invoke_function_object.hpp>
+        #define  BOOST_PP_ITERATION_LIMITS \
+            (0, BOOST_FUSION_INVOKE_FUNCTION_OBJECT_MAX_ARITY)
+        #include BOOST_PP_ITERATE()
+    }
+
+    namespace result_of
+    {
+        template <class Function, class Sequence> struct invoke_function_object
+        {
+            typedef typename detail::invoke_function_object_impl<
+                typename boost::remove_reference<Function>::type, Sequence
+                >::result_type type;
+        };
+    }
+
+    template <class Function, class Sequence>
+    inline typename result_of::invoke_function_object<Function,Sequence>::type
+    invoke_function_object(Function f, Sequence & s)
+    {
+        return detail::invoke_function_object_impl<
+                typename boost::remove_reference<Function>::type,Sequence
+            >::call(f,s);
+    }
+
+    template <class Function, class Sequence>
+    inline typename result_of::invoke_function_object<Function,Sequence const>::type
+    invoke_function_object(Function f, Sequence const & s)
+    {
+        return detail::invoke_function_object_impl<
+                typename boost::remove_reference<Function>::type,Sequence const
+            >::call(f,s);
+    }
+
+}}
+
+#define BOOST_FUSION_FUNCTIONAL_INVOCATION_INVOKE_FUNCTION_OBJECT_HPP_INCLUDED
+#else // defined(BOOST_PP_IS_ITERATING)
+///////////////////////////////////////////////////////////////////////////////
+//
+//  Preprocessor vertical repetition code
+//
+///////////////////////////////////////////////////////////////////////////////
+#define N BOOST_PP_ITERATION()
+
+        template <class Function, class Sequence>
+        struct invoke_function_object_impl<Function,Sequence,N,true>
+        {
+        public:
+
+            typedef typename boost::result_of<
+#define M(z,j,data)                                                             \
+        typename result_of::at_c<Sequence,j>::type
+                Function (BOOST_PP_ENUM(N,M,~)) >::type result_type;
+#undef M
+
+            template <class F>
+            static inline result_type
+            call(F & f, Sequence & s)
+            {
+#define M(z,j,data) fusion::at_c<j>(s)
+                return f( BOOST_PP_ENUM(N,M,~) );
+#undef M
+            }
+        };
+
+        template <class Function, class Sequence>
+        struct invoke_function_object_impl<Function,Sequence,N,false>
+        {
+        private:
+            typedef invoke_function_object_param_types<Sequence,N> seq;
+        public:
+            typedef typename boost::result_of<
+                Function (BOOST_PP_ENUM_PARAMS(N,typename seq::T))
+                >::type result_type;
+
+            template <class F>
+            static inline result_type
+            call(F & f, Sequence & s)
+            {
+#if N > 0
+                typename seq::I0 i0 = fusion::begin(s);
+#define M(z,j,data)                                                             \
+            typename seq::I##j i##j =                                          \
+                fusion::next(BOOST_PP_CAT(i,BOOST_PP_DEC(j)));
+                BOOST_PP_REPEAT_FROM_TO(1,N,M,~)
+#undef M
+#endif
+                return f( BOOST_PP_ENUM_PARAMS(N,*i) );
+            }
+        };
+
+        template <class Sequence>
+        struct invoke_function_object_param_types<Sequence,N>
+        {
+#if N > 0
+            typedef typename result_of::begin<Sequence>::type I0;
+            typedef typename result_of::deref<I0>::type T0;
+
+#define M(z,i,data)                                                             \
+            typedef typename result_of::next<                                  \
+                BOOST_PP_CAT(I,BOOST_PP_DEC(i))>::type I##i;                   \
+            typedef typename result_of::deref<I##i>::type T##i;
+
+            BOOST_PP_REPEAT_FROM_TO(1,N,M,~)
+#undef M
+#endif
+        };
+
+#undef N
+#endif // defined(BOOST_PP_IS_ITERATING)
+#endif
+
Added: sandbox/SOC/2009/fusion/boost/fusion/functional/invocation/invoke_procedure.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/functional/invocation/invoke_procedure.hpp	2009-07-05 11:43:45 EDT (Sun, 05 Jul 2009)
@@ -0,0 +1,171 @@
+/*=============================================================================
+    Copyright (c) 2005-2006 Joao Abecasis
+    Copyright (c) 2006-2007 Tobias Schwinger
+
+    Use modification and distribution are subject to the Boost Software
+    License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+    http://www.boost.org/LICENSE_1_0.txt).
+==============================================================================*/
+
+#if !defined(BOOST_FUSION_FUNCTIONAL_INVOCATION_INVOKE_PROCEDURE_HPP_INCLUDED)
+#if !defined(BOOST_PP_IS_ITERATING)
+
+#include <boost/preprocessor/cat.hpp>
+#include <boost/preprocessor/iteration/iterate.hpp>
+#include <boost/preprocessor/arithmetic/dec.hpp>
+#include <boost/preprocessor/repetition/repeat_from_to.hpp>
+#include <boost/preprocessor/repetition/enum.hpp>
+#include <boost/preprocessor/repetition/enum_shifted.hpp>
+#include <boost/preprocessor/repetition/enum_params.hpp>
+#include <boost/preprocessor/repetition/enum_shifted_params.hpp>
+
+#include <boost/type_traits/remove_reference.hpp>
+
+#include <boost/mpl/front.hpp>
+
+#include <boost/function_types/is_callable_builtin.hpp>
+#include <boost/function_types/is_member_function_pointer.hpp>
+#include <boost/function_types/parameter_types.hpp>
+
+#include <boost/fusion/support/category_of.hpp>
+#include <boost/fusion/sequence/intrinsic/at.hpp>
+#include <boost/fusion/sequence/intrinsic/size.hpp>
+#include <boost/fusion/sequence/intrinsic/begin.hpp>
+#include <boost/fusion/iterator/next.hpp>
+#include <boost/fusion/iterator/deref.hpp>
+#include <boost/fusion/functional/invocation/limits.hpp>
+#include <boost/fusion/functional/invocation/detail/that_ptr.hpp>
+
+namespace boost { namespace fusion
+{
+    namespace result_of
+    {
+        template <typename Function, class Sequence> struct invoke_procedure
+        {
+            typedef void type;
+        };
+    }
+
+    template <typename Function, class Sequence>
+    inline void invoke_procedure(Function, Sequence &);
+
+    template <typename Function, class Sequence>
+    inline void invoke_procedure(Function, Sequence const &);
+
+    //----- ---- --- -- - -  -   -
+
+    namespace detail
+    {
+        namespace ft = function_types;
+
+        template<
+            typename Function, class Sequence,
+            int N = result_of::size<Sequence>::value,
+            bool MFP = ft::is_member_function_pointer<Function>::value,
+            bool RandomAccess = traits::is_random_access<Sequence>::value
+            >
+        struct invoke_procedure_impl;
+
+        #define  BOOST_PP_FILENAME_1 \
+            <boost/fusion/functional/invocation/invoke_procedure.hpp>
+        #define  BOOST_PP_ITERATION_LIMITS \
+            (0, BOOST_FUSION_INVOKE_PROCEDURE_MAX_ARITY)
+        #include BOOST_PP_ITERATE()
+
+    }
+
+    template <typename Function, class Sequence>
+    inline void invoke_procedure(Function f, Sequence & s)
+    {
+        detail::invoke_procedure_impl<
+                typename boost::remove_reference<Function>::type,Sequence
+            >::call(f,s);
+    }
+
+    template <typename Function, class Sequence>
+    inline void invoke_procedure(Function f, Sequence const & s)
+    {
+        detail::invoke_procedure_impl<
+                typename boost::remove_reference<Function>::type,Sequence const
+            >::call(f,s);
+    }
+
+}}
+
+#define BOOST_FUSION_FUNCTIONAL_INVOCATION_INVOKE_PROCEDURE_HPP_INCLUDED
+#else // defined(BOOST_PP_IS_ITERATING)
+///////////////////////////////////////////////////////////////////////////////
+//
+//  Preprocessor vertical repetition code
+//
+///////////////////////////////////////////////////////////////////////////////
+#define N BOOST_PP_ITERATION()
+
+#define M(z,j,data) fusion::at_c<j>(s)
+
+        template <typename Function, class Sequence>
+        struct invoke_procedure_impl<Function,Sequence,N,false,true>
+        {
+            static inline void call(Function & f, Sequence & s)
+            {
+                f(BOOST_PP_ENUM(N,M,~));
+            }
+        };
+
+#if N > 0
+        template <typename Function, class Sequence>
+        struct invoke_procedure_impl<Function,Sequence,N,true,true>
+        {
+            static inline void call(Function & f, Sequence & s)
+            {
+                (that_ptr<typename mpl::front<
+                                ft::parameter_types<Function> >::type
+                    >::get(fusion::at_c<0>(s))->*f)(BOOST_PP_ENUM_SHIFTED(N,M,~));
+            }
+        };
+#endif
+
+#undef M
+
+#define M(z,j,data)                                                             \
+            typedef typename result_of::next< BOOST_PP_CAT(I,BOOST_PP_DEC(j))  \
+                >::type I ## j ;                                               \
+            I##j i##j = fusion::next(BOOST_PP_CAT(i,BOOST_PP_DEC(j)));
+
+        template <typename Function, class Sequence>
+        struct invoke_procedure_impl<Function,Sequence,N,false,false>
+        {
+            static inline void call(Function & f, Sequence & s)
+            {
+#if N > 0
+                typedef typename result_of::begin<Sequence>::type I0;
+                I0 i0 = fusion::begin(s);
+                BOOST_PP_REPEAT_FROM_TO(1,N,M,~)
+#endif
+                f( BOOST_PP_ENUM_PARAMS(N,*i) );
+            }
+        };
+
+#if N > 0
+        template <typename Function, class Sequence>
+        struct invoke_procedure_impl<Function,Sequence,N,true,false>
+        {
+            static inline void call(Function & f, Sequence & s)
+            {
+                typedef typename result_of::begin<Sequence>::type I0;
+                I0 i0 = fusion::begin(s);
+                BOOST_PP_REPEAT_FROM_TO(1,N,M,~)
+
+                (that_ptr<typename mpl::front<
+                                ft::parameter_types<Function> >::type
+                    >::get(*i0)->*f)(BOOST_PP_ENUM_SHIFTED_PARAMS(N,*i));
+            }
+        };
+#endif
+
+#undef M
+
+#undef N
+#endif // defined(BOOST_PP_IS_ITERATING)
+#endif
+
Added: sandbox/SOC/2009/fusion/boost/fusion/functional/invocation/limits.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/functional/invocation/limits.hpp	2009-07-05 11:43:45 EDT (Sun, 05 Jul 2009)
@@ -0,0 +1,23 @@
+/*=============================================================================
+    Copyright (c) 2006-2007 Tobias Schwinger
+  
+    Use modification and distribution are subject to the Boost Software 
+    License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+    http://www.boost.org/LICENSE_1_0.txt).
+==============================================================================*/
+
+#if !defined(BOOST_FUSION_FUNCTIONAL_INVOCATION_LIMITS_HPP_INCLUDED)
+#   define BOOST_FUSION_FUNCTIONAL_INVOCATION_LIMITS_HPP_INCLUDED
+
+#   if !defined(BOOST_FUSION_INVOKE_MAX_ARITY)
+#       define BOOST_FUSION_INVOKE_MAX_ARITY 6
+#   endif
+#   if !defined(BOOST_FUSION_INVOKE_PROCEDURE_MAX_ARITY)
+#       define BOOST_FUSION_INVOKE_PROCEDURE_MAX_ARITY 6
+#   endif
+#   if !defined(BOOST_FUSION_INVOKE_FUNCTION_OBJECT_MAX_ARITY)
+#       define BOOST_FUSION_INVOKE_FUNCTION_OBJECT_MAX_ARITY 6
+#   endif
+
+#endif
+