Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r55014 - in sandbox/SOC/2009/fusion: . boost/fusion/algorithm/query/detail boost/fusion/container/vector boost/fusion/container/vector/detail/variadic_templates boost/fusion/functional boost/fusion/functional/adapter boost/fusion/functional/adapter/detail boost/fusion/functional/adapter/detail/decltype_and_variadic_templates boost/fusion/functional/adapter/detail/no_decltype_or_variadic_templates boost/fusion/functional/generation/detail boost/fusion/functional/invocation boost/fusion/functional/invocation/detail boost/fusion/functional/invocation/detail/decltype_and_variadic_templates boost/fusion/functional/invocation/detail/no_decltype_or_variadic_templates boost/fusion/include boost/fusion/sequence/intrinsic boost/fusion/support boost/fusion/view/single_view libs/fusion/doc libs/fusion/test libs/fusion/test/functional libs/fusion/test/sequence
From: mr.chr.schmidt_at_[hidden]
Date: 2009-07-18 11:47:12


Author: cschmidt
Date: 2009-07-18 11:47:07 EDT (Sat, 18 Jul 2009)
New Revision: 55014
URL: http://svn.boost.org/trac/boost/changeset/55014

Log:
ported functional.invocation/functional.adapter.unfused*
Added:
   sandbox/SOC/2009/fusion/boost/fusion/functional/adapter/detail/decltype_and_variadic_templates/
   sandbox/SOC/2009/fusion/boost/fusion/functional/adapter/detail/decltype_and_variadic_templates/fused_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/functional/adapter/detail/decltype_and_variadic_templates/unfused_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/functional/adapter/detail/no_decltype_or_variadic_templates/
   sandbox/SOC/2009/fusion/boost/fusion/functional/adapter/detail/no_decltype_or_variadic_templates/fused.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/functional/adapter/detail/no_decltype_or_variadic_templates/fused_function_object.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/functional/adapter/detail/no_decltype_or_variadic_templates/fused_procedure.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/functional/adapter/detail/no_decltype_or_variadic_templates/unfused.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/functional/adapter/detail/no_decltype_or_variadic_templates/unfused_typed.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/functional/invocation/detail/decltype_and_variadic_templates/
   sandbox/SOC/2009/fusion/boost/fusion/functional/invocation/detail/decltype_and_variadic_templates/invoke_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/functional/invocation/detail/decltype_and_variadic_templates/invoke_impl_detail.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/functional/invocation/detail/no_decltype_or_variadic_templates/
   sandbox/SOC/2009/fusion/boost/fusion/functional/invocation/detail/no_decltype_or_variadic_templates/invoke.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/functional/invocation/detail/no_decltype_or_variadic_templates/invoke_function_object.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/functional/invocation/detail/no_decltype_or_variadic_templates/invoke_procedure.hpp (contents, props changed)
Removed:
   sandbox/SOC/2009/fusion/boost/fusion/include/make_unfused_lvalue_args.hpp
   sandbox/SOC/2009/fusion/boost/fusion/include/make_unfused_rvalue_args.hpp
   sandbox/SOC/2009/fusion/boost/fusion/include/unfused_lvalue_args.hpp
   sandbox/SOC/2009/fusion/boost/fusion/include/unfused_rvalue_args.hpp
Text files modified:
   sandbox/SOC/2009/fusion/boost/fusion/algorithm/query/detail/find_if.hpp | 367 ++++++++++++++++++++-------------------
   sandbox/SOC/2009/fusion/boost/fusion/container/vector/detail/variadic_templates/vector_n.hpp | 6
   sandbox/SOC/2009/fusion/boost/fusion/container/vector/vector10.hpp | 24 --
   sandbox/SOC/2009/fusion/boost/fusion/functional/adapter.hpp | 2
   sandbox/SOC/2009/fusion/boost/fusion/functional/adapter/detail/access.hpp | 4
   sandbox/SOC/2009/fusion/boost/fusion/functional/adapter/fused.hpp | 90 +--------
   sandbox/SOC/2009/fusion/boost/fusion/functional/adapter/fused_function_object.hpp | 95 +---------
   sandbox/SOC/2009/fusion/boost/fusion/functional/adapter/fused_procedure.hpp | 75 +------
   sandbox/SOC/2009/fusion/boost/fusion/functional/adapter/limits.hpp | 9
   sandbox/SOC/2009/fusion/boost/fusion/functional/adapter/unfused.hpp | 155 +---------------
   sandbox/SOC/2009/fusion/boost/fusion/functional/adapter/unfused_typed.hpp | 155 +---------------
   sandbox/SOC/2009/fusion/boost/fusion/functional/generation/detail/gen_make_adapter.hpp | 24 +-
   sandbox/SOC/2009/fusion/boost/fusion/functional/invocation/detail/that_ptr.hpp | 51 +++--
   sandbox/SOC/2009/fusion/boost/fusion/functional/invocation/invoke.hpp | 309 +--------------------------------
   sandbox/SOC/2009/fusion/boost/fusion/functional/invocation/invoke_function_object.hpp | 180 +------------------
   sandbox/SOC/2009/fusion/boost/fusion/functional/invocation/invoke_procedure.hpp | 174 +-----------------
   sandbox/SOC/2009/fusion/boost/fusion/functional/invocation/limits.hpp | 14
   sandbox/SOC/2009/fusion/boost/fusion/sequence/intrinsic/begin.hpp | 2
   sandbox/SOC/2009/fusion/boost/fusion/support/result_of.hpp | 115 ++++++++++++
   sandbox/SOC/2009/fusion/boost/fusion/view/single_view/single_view.hpp | 1
   sandbox/SOC/2009/fusion/build.bat | 2
   sandbox/SOC/2009/fusion/libs/fusion/doc/Jamfile | 15
   sandbox/SOC/2009/fusion/libs/fusion/doc/functional.qbk | 13 +
   sandbox/SOC/2009/fusion/libs/fusion/doc/fusion.qbk | 2
   sandbox/SOC/2009/fusion/libs/fusion/test/Jamfile | 16
   sandbox/SOC/2009/fusion/libs/fusion/test/functional/invoke.cpp | 6
   sandbox/SOC/2009/fusion/libs/fusion/test/functional/invoke_procedure.cpp | 2
   sandbox/SOC/2009/fusion/libs/fusion/test/sequence/vector_n.cpp | 6
   sandbox/SOC/2009/fusion/project-root.jam | 4
   29 files changed, 492 insertions(+), 1426 deletions(-)

Modified: sandbox/SOC/2009/fusion/boost/fusion/algorithm/query/detail/find_if.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/algorithm/query/detail/find_if.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/algorithm/query/detail/find_if.hpp 2009-07-18 11:47:07 EDT (Sat, 18 Jul 2009)
@@ -28,210 +28,211 @@
 namespace boost { namespace fusion {
     struct random_access_traversal_tag;
 
-namespace detail
-{
- template <typename It, typename Pred>
- struct apply_filter
- : mpl::apply1<Pred, typename result_of::value_of<It>::type>::type
+ namespace detail
     {
- };
+ template <typename It, typename Pred>
+ struct apply_filter
+ : mpl::apply1<Pred, typename result_of::value_of<It>::type>::type
+ {
+ };
 
- template <typename First, typename Last, typename Pred>
- struct main_find_if;
+ template <typename First, typename Last, typename Pred>
+ struct main_find_if;
 
- template <typename First, typename Last, typename Pred>
- struct recursive_find_if
- {
- typedef typename
- main_find_if<
- typename result_of::next<First>::type
- , Last
- , Pred
- >::type
- type;
- };
+ template <typename First, typename Last, typename Pred>
+ struct recursive_find_if
+ {
+ typedef typename
+ main_find_if<
+ typename result_of::next<First>::type
+ , Last
+ , Pred
+ >::type
+ type;
+ };
 
- template <typename First, typename Last, typename Pred>
- struct main_find_if
- {
- typedef typename
- mpl::eval_if<
- mpl::or_<
- result_of::equal_to<First, Last>
- , apply_filter<First, Pred>
- >
- , mpl::identity<First>
- , recursive_find_if<First, Last, Pred>
+ template <typename First, typename Last, typename Pred>
+ struct main_find_if
+ {
+ typedef typename
+ mpl::eval_if<
+ mpl::or_<
+ result_of::equal_to<First, Last>
+ , apply_filter<First, Pred>
+ >
+ , mpl::identity<First>
+ , recursive_find_if<First, Last, Pred>
+ >::type
+ type;
+ };
+
+ template<typename First, typename Last, typename Pred, bool>
+ struct choose_find_if;
+
+ template<typename First, typename Last, typename Pred>
+ struct choose_find_if<First, Last, Pred, false>
+ : main_find_if<First, Last, Pred>
+ {};
+
+ template<typename It, typename Pred, int n, int unrolling>
+ struct unroll_again;
+
+ template <typename It, typename Pred, int offset>
+ struct apply_offset_filter
+ : mpl::apply1<
+ Pred
+ , typename result_of::value_of<
+ typename result_of::advance_c<It, offset>::type
+ >::type
>::type
- type;
- };
-
- template<typename First, typename Last, typename Pred, bool>
- struct choose_find_if;
+ {
+ };
 
- template<typename First, typename Last, typename Pred>
- struct choose_find_if<First, Last, Pred, false>
- : main_find_if<First, Last, Pred>
- {};
-
- template<typename It, typename Pred, int n, int unrolling>
- struct unroll_again;
-
- template <typename It, typename Pred, int offset>
- struct apply_offset_filter
- : mpl::apply1<
- Pred
- , typename result_of::value_of<
- typename result_of::advance_c<It, offset>::type
- >::type
- >::type
- {
- };
+ template<typename It, typename Pred, int n>
+ struct unrolled_find_if
+ {
+ typedef typename
+ mpl::eval_if<
+ apply_filter<It, Pred>
+ , mpl::identity<It>
+ , mpl::eval_if<
+ apply_offset_filter<It, Pred, 1>
+ , result_of::advance_c<It, 1>
+ , mpl::eval_if<
+ apply_offset_filter<It, Pred, 2>
+ , result_of::advance_c<It, 2>
+ , mpl::eval_if<
+ apply_offset_filter<It, Pred, 3>
+ , result_of::advance_c<It, 3>
+ , unroll_again<
+ It
+ , Pred
+ , n
+ , 4
+ >
+ >
+ >
+ >
+ >::type
+ type;
+ };
 
- template<typename It, typename Pred, int n>
- struct unrolled_find_if
- {
- typedef typename
- mpl::eval_if<
- apply_filter<It, Pred>
- , mpl::identity<It>
- , mpl::eval_if<
- apply_offset_filter<It, Pred, 1>
- , result_of::advance_c<It, 1>
+ template<typename It, typename Pred>
+ struct unrolled_find_if<It, Pred, 3>
+ {
+ typedef typename
+ mpl::eval_if<
+ apply_filter<It, Pred>
+ , mpl::identity<It>
                   , mpl::eval_if<
- apply_offset_filter<It, Pred, 2>
- , result_of::advance_c<It, 2>
+ apply_offset_filter<It, Pred, 1>
+ , result_of::advance_c<It, 1>
                       , mpl::eval_if<
- apply_offset_filter<It, Pred, 3>
+ apply_offset_filter<It, Pred, 2>
+ , result_of::advance_c<It, 2>
                           , result_of::advance_c<It, 3>
- , unroll_again<
- It
- , Pred
- , n
- , 4
- >
>
>
- >
- >::type
- type;
- };
+ >::type
+ type;
+ };
 
- template<typename It, typename Pred>
- struct unrolled_find_if<It, Pred, 3>
- {
- typedef typename
- mpl::eval_if<
- apply_filter<It, Pred>
- , mpl::identity<It>
- , mpl::eval_if<
- apply_offset_filter<It, Pred, 1>
- , result_of::advance_c<It, 1>
+ template<typename It, typename Pred>
+ struct unrolled_find_if<It, Pred, 2>
+ {
+ typedef typename
+ mpl::eval_if<
+ apply_filter<It, Pred>
+ , mpl::identity<It>
                   , mpl::eval_if<
- apply_offset_filter<It, Pred, 2>
+ apply_offset_filter<It, Pred, 1>
+ , result_of::advance_c<It, 1>
                       , result_of::advance_c<It, 2>
- , result_of::advance_c<It, 3>
>
- >
- >::type
- type;
- };
+ >::type
+ type;
+ };
 
- template<typename It, typename Pred>
- struct unrolled_find_if<It, Pred, 2>
- {
- typedef typename
- mpl::eval_if<
- apply_filter<It, Pred>
- , mpl::identity<It>
- , mpl::eval_if<
- apply_offset_filter<It, Pred, 1>
+ template<typename It, typename Pred>
+ struct unrolled_find_if<It, Pred, 1>
+ {
+ typedef typename
+ mpl::eval_if<
+ apply_filter<It, Pred>
+ , mpl::identity<It>
                   , result_of::advance_c<It, 1>
- , result_of::advance_c<It, 2>
- >
- >::type
- type;
- };
-
- template<typename It, typename Pred>
- struct unrolled_find_if<It, Pred, 1>
- {
- typedef typename
- mpl::eval_if<
- apply_filter<It, Pred>
- , mpl::identity<It>
- , result_of::advance_c<It, 1>
- >::type
- type;
- };
-
- template<typename It, typename Pred, int n, int unrolling>
- struct unroll_again
- {
- typedef typename
- unrolled_find_if<
- typename result_of::advance_c<It, unrolling>::type
- , Pred
- , n-unrolling
- >::type
- type;
- };
+ >::type
+ type;
+ };
 
- template<typename It, typename Pred>
- struct unrolled_find_if<It, Pred, 0>
- {
- typedef It type;
- };
+ template<typename It, typename Pred, int n, int unrolling>
+ struct unroll_again
+ {
+ typedef typename
+ unrolled_find_if<
+ typename result_of::advance_c<It, unrolling>::type
+ , Pred
+ , n-unrolling
+ >::type
+ type;
+ };
 
- template<typename First, typename Last, typename Pred>
- struct choose_find_if<First, Last, Pred, true>
- {
- typedef typename
- unrolled_find_if<
- First
- , Pred
- , result_of::distance<First, Last>::value
- >::type
- type;
- };
+ template<typename It, typename Pred>
+ struct unrolled_find_if<It, Pred, 0>
+ {
+ typedef It type;
+ };
 
- template <typename First, typename Last, typename Pred>
- struct static_find_if
- {
- typedef typename
- choose_find_if<
- First
- , Last
- , Pred
- , is_base_of<
- random_access_traversal_tag
- , typename traits::category_of<First>::type
- >::value
- >::type
- type;
+ template<typename First, typename Last, typename Pred>
+ struct choose_find_if<First, Last, Pred, true>
+ {
+ typedef typename
+ unrolled_find_if<
+ First
+ , Pred
+ , result_of::distance<First, Last>::value
+ >::type
+ type;
+ };
 
- template <typename It>
- static type
- call(It const& it)
- {
- typedef typename result_of::distance<It, type>::type N;
- return fusion::advance<N>(it);
- }
- };
-
- template <typename First, typename Last, typename Pred>
- struct static_seq_find_if
- : static_find_if<First, Last, Pred>
- {
- template <typename Seq>
- static typename static_find_if<First, Last, Pred>::type
- call(BOOST_FUSION_R_ELSE_CLREF(Seq) seq)
- {
- typedef static_find_if<First, Last, Pred> gen;
-
- return gen::call(fusion::begin(BOOST_FUSION_FORWARD(Seq,seq)));
- }
- };
-}}}
+ template <typename First, typename Last, typename Pred>
+ struct static_find_if
+ {
+ typedef typename
+ choose_find_if<
+ First
+ , Last
+ , Pred
+ , is_base_of<
+ random_access_traversal_tag
+ , typename traits::category_of<First>::type
+ >::value
+ >::type
+ type;
+
+ template <typename It>
+ static type
+ call(It const& it)
+ {
+ typedef typename result_of::distance<It, type>::type N;
+ return fusion::advance<N>(it);
+ }
+ };
+
+ template <typename First, typename Last, typename Pred>
+ struct static_seq_find_if
+ : static_find_if<First, Last, Pred>
+ {
+ template <typename Seq>
+ static typename static_find_if<First, Last, Pred>::type
+ call(BOOST_FUSION_R_ELSE_CLREF(Seq) seq)
+ {
+ typedef static_find_if<First, Last, Pred> gen;
+
+ return gen::call(fusion::begin(BOOST_FUSION_FORWARD(Seq,seq)));
+ }
+ };
+ }
+}}
 
 #endif

Modified: sandbox/SOC/2009/fusion/boost/fusion/container/vector/detail/variadic_templates/vector_n.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/container/vector/detail/variadic_templates/vector_n.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/vector/detail/variadic_templates/vector_n.hpp 2009-07-18 11:47:07 EDT (Sat, 18 Jul 2009)
@@ -6,8 +6,12 @@
 #define N BOOST_PP_ITERATION()
 
 //TODO cschmidt: template typedefs
+#if !N
+struct void_;
 
-#if N != 0
+//TODO cschmidt: assert !N -> T0 == void_
+template <class T0=void_>
+#else
 template <BOOST_PP_ENUM_PARAMS(N, typename T)>
 #endif
 struct BOOST_PP_CAT(vector, N)

Modified: sandbox/SOC/2009/fusion/boost/fusion/container/vector/vector10.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/container/vector/vector10.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/vector/vector10.hpp 2009-07-18 11:47:07 EDT (Sat, 18 Jul 2009)
@@ -45,35 +45,13 @@
 namespace boost { namespace fusion
 {
 #ifdef BOOST_NO_VARIADIC_TEMPLATES
- struct vector_tag;
- struct fusion_sequence_tag;
- struct random_access_traversal_tag;
-
- struct vector0 : sequence_base<vector0>
- {
- typedef mpl::vector0<> types;
- typedef vector_tag fusion_tag;
- typedef fusion_sequence_tag tag; // this gets picked up by MPL
- typedef mpl::false_ is_view;
- typedef random_access_traversal_tag category;
- typedef mpl::int_<0> size;
-
- vector0()
- {}
-
- template<typename Seq>
- vector0(Seq const& seq)
- {}
- };
-
 # define BOOST_PP_FILENAME_1 <boost/fusion/container/vector/detail/pp/vector_n.hpp>
-# define BOOST_PP_ITERATION_LIMITS (1, 10)
 #else
 # define BOOST_PP_FILENAME_1 <boost/fusion/container/vector/detail/variadic_templates/vector_n.hpp>
-# define BOOST_PP_ITERATION_LIMITS (0, 10)
 #endif
 
 // expand vector1 to vector10
+# define BOOST_PP_ITERATION_LIMITS (0, 10)
 # include BOOST_PP_ITERATE()
 
 }}

Modified: sandbox/SOC/2009/fusion/boost/fusion/functional/adapter.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/functional/adapter.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/functional/adapter.hpp 2009-07-18 11:47:07 EDT (Sat, 18 Jul 2009)
@@ -8,9 +8,11 @@
 
 #ifndef BOOST_FUSION_FUNCTIONAL_ADAPTER_HPP
 #define BOOST_FUSION_FUNCTIONAL_ADAPTER_HPP
+
 #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

Modified: sandbox/SOC/2009/fusion/boost/fusion/functional/adapter/detail/access.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/functional/adapter/detail/access.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/functional/adapter/detail/access.hpp 2009-07-18 11:47:07 EDT (Sat, 18 Jul 2009)
@@ -12,7 +12,7 @@
 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 { 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; };
 
@@ -34,7 +34,7 @@
     // 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; };
+ template <typename T> struct qf<T &> { typedef T type; };*/
 }}}
 
 #endif

Added: sandbox/SOC/2009/fusion/boost/fusion/functional/adapter/detail/decltype_and_variadic_templates/fused_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/functional/adapter/detail/decltype_and_variadic_templates/fused_impl.hpp 2009-07-18 11:47:07 EDT (Sat, 18 Jul 2009)
@@ -0,0 +1,4 @@
+// Copyright Christopher Schmidt 2009.
+// Distributed under 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)

Added: sandbox/SOC/2009/fusion/boost/fusion/functional/adapter/detail/decltype_and_variadic_templates/unfused_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/functional/adapter/detail/decltype_and_variadic_templates/unfused_impl.hpp 2009-07-18 11:47:07 EDT (Sat, 18 Jul 2009)
@@ -0,0 +1,108 @@
+// Copyright Christopher Schmidt 2009.
+// Distributed under 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)
+
+#include <boost/fusion/support/ref.hpp>
+#include <boost/fusion/support/result_of.hpp>
+
+#include <boost/preprocessor/empty.hpp>
+
+#ifdef BOOST_FUSION_TYPED
+# include <boost/fusion/container/vector/convert.hpp>
+
+# define BOOST_FUSION_ADAPTER_NAME unfused_typed
+#else
+# include <boost/fusion/container/generation/vector_tie.hpp>
+
+# define BOOST_FUSION_ADAPTER_NAME unfused
+#endif
+
+namespace boost { namespace fusion
+{
+ template<
+ typename F
+#ifdef BOOST_FUSION_TYPED
+ , typename TransformSeq
+#else
+ , bool=true
+#endif
+ >
+ struct BOOST_FUSION_ADAPTER_NAME
+ {
+ BOOST_FUSION_ADAPTER_NAME()
+ : f()
+ {}
+
+ template<typename... Args>
+ BOOST_FUSION_ADAPTER_NAME(Args&&... args)
+ : f(std::forward<Args>(args)...)
+ {}
+
+#define CTOR_SPECIALIZATION(COMBINATION,_)\
+ BOOST_FUSION_ADAPTER_NAME(BOOST_FUSION_ADAPTER_NAME COMBINATION adapter)\
+ : f(std::forward<BOOST_FUSION_ADAPTER_NAME COMBINATION>(adapter).f)\
+ {}
+
+ BOOST_FUSION_ALL_CV_REF_COMBINATIONS(CTOR_SPECIALIZATION,_)
+
+#undef CTOR_SPECIALIZATION
+
+ template<typename OtherF>
+ BOOST_FUSION_ADAPTER_NAME&
+ operator=(OtherF&& other_f)
+ {
+ f=std::forward<OtherF>(other_f);
+ return *this;
+ }
+
+#define ASSIGN_SPECIALIZATION(COMBINATION,_)\
+ BOOST_FUSION_ADAPTER_NAME&\
+ operator=(BOOST_FUSION_ADAPTER_NAME COMBINATION other_adapter)\
+ {\
+ f=std::forward<BOOST_FUSION_ADAPTER_NAME COMBINATION>(\
+ other_adapter).f;\
+ return *this;\
+ }
+
+ BOOST_FUSION_ALL_CV_REF_COMBINATIONS(ASSIGN_SPECIALIZATION,_)
+
+#undef ASSIGN_SPECIALIZATION
+
+#ifdef BOOST_FUSION_TYPED
+# define CALL_OPERATOR(COMBINATION)\
+ template<typename... Args>\
+ typename support::result_of<\
+ F(typename result_of::as_vector<TransformSeq&&>::type)\
+ >::type\
+ operator()(Args&&... args) COMBINATION\
+ {\
+ return f(fusion::as_vector(\
+ TransformSeq(std::forward<Args>(args)...)));\
+ }
+#else
+# define CALL_OPERATOR(COMBINATION)\
+ template<typename... Args>\
+ typename support::result_of<\
+ F(typename result_of::vector_tie<Args&&...>::type)\
+ >::type\
+ operator()(Args&&... args) COMBINATION\
+ {\
+ return f(vector_tie(std::forward<Args>(args)...));\
+ }
+#endif
+
+ CALL_OPERATOR(BOOST_PP_EMPTY());
+ CALL_OPERATOR(const);
+ CALL_OPERATOR(volatile);
+ CALL_OPERATOR(const volatile);
+#
+#undef CALL_OPERATOR
+#undef OUTER_GEENRATOR
+
+ F f;
+ };
+}}
+
+#undef BOOST_FUSION_ADAPTER_NAME
+

Added: sandbox/SOC/2009/fusion/boost/fusion/functional/adapter/detail/no_decltype_or_variadic_templates/fused.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/functional/adapter/detail/no_decltype_or_variadic_templates/fused.hpp 2009-07-18 11:47:07 EDT (Sat, 18 Jul 2009)
@@ -0,0 +1,84 @@
+/*=============================================================================
+ 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).
+==============================================================================*/
+
+#ifndef BOOST_FUSION_FUNCTIONAL_ADAPTER_DETAIL_NO_DECLTYPE_OR_VARIADIC_TEMPLATES_FUSED_HPP
+#define BOOST_FUSION_FUNCTIONAL_ADAPTER_DETAIL_NO_DECLTYPE_OR_VARIADIC_TEMPLATES_FUSED_HPP
+
+#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/detail/no_decltype_or_variadic_templates/fused_function_object.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/functional/adapter/detail/no_decltype_or_variadic_templates/fused_function_object.hpp 2009-07-18 11:47:07 EDT (Sat, 18 Jul 2009)
@@ -0,0 +1,89 @@
+/*=============================================================================
+ 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).
+==============================================================================*/
+
+#ifndef BOOST_FUSION_FUNCTIONAL_ADAPTER_DETAIL_NO_DECLTYPE_OR_VARIADIC_TEMPLATES_FUSED_FUNCTION_OBJECT_HPP
+#define BOOST_FUSION_FUNCTIONAL_ADAPTER_DETAIL_NO_DECLTYPE_OR_VARIADIC_TEMPLATES_FUSED_FUNCTION_OBJECT_HPP
+
+#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/detail/no_decltype_or_variadic_templates/fused_procedure.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/functional/adapter/detail/no_decltype_or_variadic_templates/fused_procedure.hpp 2009-07-18 11:47:07 EDT (Sat, 18 Jul 2009)
@@ -0,0 +1,69 @@
+/*=============================================================================
+ 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).
+==============================================================================*/
+
+#ifndef BOOST_FUSION_FUNCTIONAL_ADAPTER_DETAIL_NO_DECLTYPE_OR_VARIADIC_TEMPLATES_FUSED_PROCEDURE_HPP
+#define BOOST_FUSION_FUNCTIONAL_ADAPTER_DETAIL_NO_DECLTYPE_OR_VARIADIC_TEMPLATES_FUSED_PROCEDURE_HPP
+
+#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/detail/no_decltype_or_variadic_templates/unfused.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/functional/adapter/detail/no_decltype_or_variadic_templates/unfused.hpp 2009-07-18 11:47:07 EDT (Sat, 18 Jul 2009)
@@ -0,0 +1,150 @@
+/*=============================================================================
+ 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).
+==============================================================================*/
+
+#ifndef BOOST_FUSION_FUNCTIONAL_ADAPTER_DETAIL_NO_DECLTYPE_OR_VARIADIC_TEMPLATES_UNFUSED_HPP
+#define BOOST_FUSION_FUNCTIONAL_ADAPTER_DETAIL_NO_DECLTYPE_OR_VARIADIC_TEMPLATES_UNFUSED_HPP
+
+#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/detail/no_decltype_or_variadic_templates/unfused_typed.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/functional/adapter/detail/no_decltype_or_variadic_templates/unfused_typed.hpp 2009-07-18 11:47:07 EDT (Sat, 18 Jul 2009)
@@ -0,0 +1,154 @@
+/*=============================================================================
+ 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).
+==============================================================================*/
+
+#ifndef BOOST_FUSION_FUNCTIONAL_ADAPTER_DETAIL_NO_DECLTYPE_OR_VARIADIC_TEMPLATES_UNFUSED_TYPED_HPP
+#define BOOST_FUSION_FUNCTIONAL_ADAPTER_DETAIL_NO_DECLTYPE_OR_VARIADIC_TEMPLATES_UNFUSED_TYPED_HPP
+
+#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

Modified: sandbox/SOC/2009/fusion/boost/fusion/functional/adapter/fused.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/functional/adapter/fused.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/functional/adapter/fused.hpp 2009-07-18 11:47:07 EDT (Sat, 18 Jul 2009)
@@ -1,84 +1,18 @@
-/*=============================================================================
- 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).
-==============================================================================*/
+// Copyright Christopher Schmidt 2009.
+// Distributed under 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)
 
 #ifndef BOOST_FUSION_FUNCTIONAL_ADAPTER_FUSED_HPP
 #define BOOST_FUSION_FUNCTIONAL_ADAPTER_FUSED_HPP
 
-#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 >
- { };
-
- };
-
-}}
+#include <boost/config.hpp>
+#if defined(BOOST_NO_DECLTYPE) || defined(BOOST_NO_VARIADIC_TEMPLATES)
+# include <boost/fusion/functional/adapter/detail/no_decltype_or_variadic_templates/fused.hpp>
+#else
+# define BOOST_FUSION_ADAPTER_NAME fused
+# include <boost/fusion/functional/adapter/detail/decltype_and_variadic_templates/fused_impl.hpp>
+# undef BOOST_FUSION_ADAPTER_NAME
+#endif
 
 #endif

Modified: sandbox/SOC/2009/fusion/boost/fusion/functional/adapter/fused_function_object.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/functional/adapter/fused_function_object.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/functional/adapter/fused_function_object.hpp 2009-07-18 11:47:07 EDT (Sat, 18 Jul 2009)
@@ -1,89 +1,18 @@
-/*=============================================================================
- 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).
-==============================================================================*/
+// Copyright Christopher Schmidt 2009.
+// Distributed under 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)
 
 #ifndef BOOST_FUSION_FUNCTIONAL_ADAPTER_FUSED_FUNCTION_OBJECT_HPP
 #define BOOST_FUSION_FUNCTIONAL_ADAPTER_FUSED_FUNCTION_OBJECT_HPP
 
-#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 >
- { };
- };
-
-}}
+#include <boost/config.hpp>
+#if defined(BOOST_NO_DECLTYPE) || defined(BOOST_NO_VARIADIC_TEMPLATES)
+# include <boost/fusion/functional/adapter/detail/no_decltype_or_variadic_templates/fused_function_object.hpp>
+#elif !defined(BOOST_FUSION_CPP0X_NO_DEPRECEATED)
+# define BOOST_FUSION_ADAPTER_NAME fused_function_object
+# include <boost/fusion/functional/adapter/detail/decltype_and_variadic_templates/fused_impl.hpp>
+# undef BOOST_FUSION_ADAPTER_NAME
+#endif
 
 #endif

Modified: sandbox/SOC/2009/fusion/boost/fusion/functional/adapter/fused_procedure.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/functional/adapter/fused_procedure.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/functional/adapter/fused_procedure.hpp 2009-07-18 11:47:07 EDT (Sat, 18 Jul 2009)
@@ -1,69 +1,18 @@
-/*=============================================================================
- 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).
-==============================================================================*/
+// Copyright Christopher Schmidt 2009.
+// Distributed under 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)
 
 #ifndef BOOST_FUSION_FUNCTIONAL_ADAPTER_FUSED_PROCEDURE_HPP
 #define BOOST_FUSION_FUNCTIONAL_ADAPTER_FUSED_PROCEDURE_HPP
 
-#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;
- };
-}}
+#include <boost/config.hpp>
+#if defined(BOOST_NO_DECLTYPE) || defined(BOOST_NO_VARIADIC_TEMPLATES)
+# include <boost/fusion/functional/adapter/detail/no_decltype_or_variadic_templates/fused_procedure.hpp>
+#elif !defined(BOOST_FUSION_CPP0X_NO_DEPRECEATED)
+# define BOOST_FUSION_ADAPTER_NAME fused_procedure
+# include <boost/fusion/functional/adapter/detail/decltype_and_variadic_templates/fused_impl.hpp>
+# undef BOOST_FUSION_ADAPTER_NAME
+#endif
 
 #endif

Modified: sandbox/SOC/2009/fusion/boost/fusion/functional/adapter/limits.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/functional/adapter/limits.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/functional/adapter/limits.hpp 2009-07-18 11:47:07 EDT (Sat, 18 Jul 2009)
@@ -9,17 +9,22 @@
 #ifndef BOOST_FUSION_FUNCTIONAL_ADAPTER_LIMITS_HPP
 #define BOOST_FUSION_FUNCTIONAL_ADAPTER_LIMITS_HPP
 
+#include <boost/config.hpp>
+
+#if defined(BOOST_NO_VARIADIC_TEMPLATES) || !defined(BOOST_FUSION_CPP0X_NO_DEPRECEATED)
 # include <boost/fusion/container/vector/limits.hpp>
 
-# if !defined(BOOST_FUSION_UNFUSED_MAX_ARITY)
+# ifndef 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)
+
+# ifndef 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
 
 #endif

Modified: sandbox/SOC/2009/fusion/boost/fusion/functional/adapter/unfused.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/functional/adapter/unfused.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/functional/adapter/unfused.hpp 2009-07-18 11:47:07 EDT (Sat, 18 Jul 2009)
@@ -1,150 +1,17 @@
-/*=============================================================================
- 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).
-==============================================================================*/
+// Copyright Christopher Schmidt 2009.
+// Distributed under 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)
 
 #ifndef BOOST_FUSION_FUNCTIONAL_ADAPTER_UNFUSED_HPP
 #define BOOST_FUSION_FUNCTIONAL_ADAPTER_UNFUSED_HPP
 
-#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);
- }
+#include <boost/config.hpp>
+//TODO cschmidt!!!
+#if defined(BOOST_NO_DECLTYPE) || defined(BOOST_NO_VARIADIC_TEMPLATES)// || !defined(BOOST_FUSION_CPP0X_NO_DEPRECEATED)
+# include <boost/fusion/functional/adapter/detail/no_decltype_or_variadic_templates/unfused.hpp>
+#else
+# include <boost/fusion/functional/adapter/detail/decltype_and_variadic_templates/unfused_impl.hpp>
+#endif
 
- 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

Modified: sandbox/SOC/2009/fusion/boost/fusion/functional/adapter/unfused_typed.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/functional/adapter/unfused_typed.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/functional/adapter/unfused_typed.hpp 2009-07-18 11:47:07 EDT (Sat, 18 Jul 2009)
@@ -1,154 +1,19 @@
-/*=============================================================================
- 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).
-==============================================================================*/
+// Copyright Christopher Schmidt 2009.
+// Distributed under 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)
 
 #ifndef BOOST_FUSION_FUNCTIONAL_ADAPTER_UNFUSED_TYPED_HPP
 #define BOOST_FUSION_FUNCTIONAL_ADAPTER_UNFUSED_TYPED_HPP
 
-#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));
+//TODO cschmidt!!!
+#if defined(BOOST_NO_DECLTYPE) || defined(BOOST_NO_VARIADIC_TEMPLATES)// || !defined(BOOST_FUSION_CPP0X_NO_DEPRECEATED)
+# include <boost/fusion/functional/adapter/detail/no_decltype_or_variadic_templates/unfused_typed.hpp>
 #else
- arg_vector_t arg;
+# define BOOST_FUSION_TYPED
+# include <boost/fusion/functional/adapter/detail/decltype_and_variadic_templates/unfused_impl.hpp>
+# undef BOOST_FUSION_TYPED
 #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

Modified: sandbox/SOC/2009/fusion/boost/fusion/functional/generation/detail/gen_make_adapter.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/functional/generation/detail/gen_make_adapter.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/functional/generation/detail/gen_make_adapter.hpp 2009-07-18 11:47:07 EDT (Sat, 18 Jul 2009)
@@ -8,35 +8,37 @@
 
 // No include guard - this file is included multiple times intentionally.
 
-#include <boost/preprocessor/cat.hpp>
+#include <boost/fusion/support/ref.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
+#include <boost/preprocessor/cat.hpp>
 
 #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;
+ typedef
+ 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)
+ inline typename
+ result_of::BOOST_FUSION_FUNC_NAME<BOOST_FUSION_R_ELSE_LREF(F)>::type
+ BOOST_FUSION_FUNC_NAME(BOOST_FUSION_R_ELSE_LREF(F) f)
     {
- return typename result_of::BOOST_FUSION_FUNC_NAME<F>::type(f);
+ return typename
+ result_of::BOOST_FUSION_FUNC_NAME<BOOST_FUSION_R_ELSE_LREF(F)>::
+ type(BOOST_FUSION_FORWARD(F,f));
     }
-
 }}
 
 #undef BOOST_FUSION_CLASS_TPL_NAME

Added: sandbox/SOC/2009/fusion/boost/fusion/functional/invocation/detail/decltype_and_variadic_templates/invoke_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/functional/invocation/detail/decltype_and_variadic_templates/invoke_impl.hpp 2009-07-18 11:47:07 EDT (Sat, 18 Jul 2009)
@@ -0,0 +1,33 @@
+// Copyright Christopher Schmidt 2009.
+// Distributed under 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)
+
+#include <boost/fusion/functional/invocation/detail/decltype_and_variadic_templates/invoke_impl_detail.hpp>
+
+namespace boost { namespace fusion
+{
+ namespace result_of
+ {
+ template<typename F, typename Seq>
+ struct BOOST_FUSION_INVOKE_NAME
+ {
+ typedef
+ detail::invoke_impl<
+ typename detail::add_lref<F>::type
+ , typename detail::add_lref<Seq>::type
+ >
+ gen;
+
+ typedef typename gen::type type;
+ };
+ }
+
+ template <typename F, typename Seq>
+ inline typename result_of::BOOST_FUSION_INVOKE_NAME<F, Seq&&>::type
+ BOOST_FUSION_INVOKE_NAME(F f, Seq&& seq)
+ {
+ return result_of::BOOST_FUSION_INVOKE_NAME<F, Seq&&>::gen::call(f,seq);
+ }
+}}
+

Added: sandbox/SOC/2009/fusion/boost/fusion/functional/invocation/detail/decltype_and_variadic_templates/invoke_impl_detail.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/functional/invocation/detail/decltype_and_variadic_templates/invoke_impl_detail.hpp 2009-07-18 11:47:07 EDT (Sat, 18 Jul 2009)
@@ -0,0 +1,242 @@
+// Copyright Christopher Schmidt 2009.
+// Distributed under 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)
+
+#ifndef BOOST_FUSION_FUNCTIONAL_INVOCATION_DETAIL_DECLTYPE_AND_VARIADIC_TEMPLATES_INVOKE_IMPL_DETAIL_HPP
+#define BOOST_FUSION_FUNCTIONAL_INVOCATION_DETAIL_DECLTYPE_AND_VARIADIC_TEMPLATES_INVOKE_IMPL_DETAIL_HPP
+
+#include <boost/fusion/sequence/intrinsic/size.hpp>
+#include <boost/fusion/sequence/intrinsic/empty.hpp>
+#include <boost/fusion/sequence/intrinsic/back.hpp>
+#include <boost/fusion/sequence/intrinsic/begin.hpp>
+#include <boost/fusion/iterator/deref.hpp>
+#include <boost/fusion/iterator/advance.hpp>
+#include <boost/fusion/algorithm/transformation/pop_back.hpp>
+#include <boost/fusion/support/category_of.hpp>
+#include <boost/fusion/support/ref.hpp>
+#include <boost/fusion/support/result_of.hpp>
+#include <boost/fusion/functional/invocation/detail/that_ptr.hpp>
+
+#include <boost/mpl/if.hpp>
+#include <boost/mpl/eval_if.hpp>
+#include <boost/mpl/or.hpp>
+#include <boost/type_traits/is_base_of.hpp>
+#include <boost/type_traits/is_function.hpp>
+#include <boost/type_traits/is_member_function_pointer.hpp>
+#include <boost/type_traits/remove_pointer.hpp>
+#include <boost/utility/addressof.hpp>
+#include <boost/utility/enable_if.hpp>
+
+namespace boost { namespace fusion { namespace detail
+{
+ template<typename FRef, typename... Args>
+ struct invoke_impl_result
+ {
+ typedef typename
+ boost::result_of<
+ FRef(Args...)
+ >::type
+ type;
+ };
+
+ template<typename Result, typename F, typename... Args>
+ typename
+ disable_if<
+ is_member_function_pointer<
+ typename detail::remove_reference<F>::type
+ >
+ , Result
+ >::type
+ invoke_impl_call(F&& f, Args&&... args)
+ {
+ return f(std::forward<Args>(args)...);
+ }
+
+ template<
+ typename Result
+ , typename F
+ , typename ClassInstance
+ , typename... Args
+ >
+ typename
+ enable_if<
+ is_member_function_pointer<
+ typename detail::remove_reference<F>::type
+ >
+ , Result
+ >::type
+ invoke_impl_call(F&& f, ClassInstance&& instance,Args&&... args)
+ {
+ return (that_ptr<typename support::preevaluate<F>::class_type>::
+ get(std::forward<ClassInstance>(instance))->*f)(
+ std::forward<Args>(args)...);
+ }
+
+ namespace bidirectional_traversal
+ {
+ template<
+ typename FRef
+ , typename ArgsSeq
+ , bool Empty
+ , typename... Args
+ >
+ struct invoke_impl_result
+ {
+ typedef typename result_of::pop_back<ArgsSeq>::type new_args_seq;
+
+ typedef typename
+ invoke_impl_result<
+ FRef
+ , new_args_seq
+ , result_of::empty<new_args_seq>::value
+ , typename result_of::back<ArgsSeq>::type
+ , Args...
+ >::type
+ type;
+ };
+
+ template<typename FRef, typename ArgsSeq, typename... Args>
+ struct invoke_impl_result<FRef,ArgsSeq,true,Args...>
+ : detail::invoke_impl_result<FRef,Args...>
+ {};
+
+ template<typename FRef,typename SeqRef>
+ struct invoke_impl
+ {
+ typedef typename
+ mpl::eval_if<
+ typename support::is_preevaluable<FRef>::type
+ , support::preevaluate<FRef>
+ , invoke_impl_result<
+ FRef
+ , SeqRef
+ , result_of::empty<SeqRef>::value
+ >
+ >::type
+ type;
+
+ template<typename Seq,typename... Args>
+ static typename
+ enable_if<
+ typename result_of::empty<Seq&&>::type
+ , type
+ >::type
+ call_impl(FRef f,Seq&&, Args&&... args)
+ {
+ return detail::invoke_impl_call<type>(
+ std::forward<FRef>(f),std::forward<Args>(args)...);
+ }
+
+ template<typename Seq,typename... Args>
+ static typename
+ disable_if<
+ typename result_of::empty<Seq&&>::type
+ , type
+ >::type
+ call_impl(FRef f,Seq&& seq, Args&&... args)
+ {
+ return call_impl(
+ f,
+ fusion::pop_back(std::forward<Seq>(seq)),
+ fusion::back(std::forward<Seq>(seq)),
+ std::forward<Args>(args)...);
+ }
+
+ static type
+ call(FRef f,SeqRef seq)
+ {
+ return call_impl(f,std::forward<SeqRef>(seq));
+ }
+ };
+ }
+
+ namespace forward_traversal
+ {
+ template<
+ typename FRef
+ , typename SeqRef
+ , int NumArgsLeft
+ , typename... Args
+ >
+ struct invoke_impl_result
+ : invoke_impl_result<
+ FRef
+ , SeqRef
+ , NumArgsLeft-1
+ , typename result_of::deref<
+ typename result_of::advance_c<
+ typename result_of::begin<SeqRef>::type
+ , NumArgsLeft-1
+ >::type
+ >::type
+ , Args...
+ >
+ {};
+
+ template<typename FRef, typename SeqRef, typename... Args>
+ struct invoke_impl_result<FRef,SeqRef,0,Args...>
+ : detail::invoke_impl_result<FRef,Args...>
+ {
+ };
+
+ template<typename FRef,typename SeqRef>
+ struct invoke_impl
+ {
+ typedef typename
+ mpl::eval_if<
+ typename support::is_preevaluable<FRef>::type
+ , support::preevaluate<FRef>
+ , invoke_impl_result<
+ FRef
+ , SeqRef
+ , result_of::size<SeqRef>::value
+ >
+ >::type
+ type;
+
+ template<int NumArgsLeft,typename... Args>
+ static typename enable_if_c<!NumArgsLeft,type>::type
+ call_impl(FRef f,SeqRef, Args&&... args)
+ {
+ return detail::invoke_impl_call<type>(
+ std::forward<FRef>(f),std::forward<Args>(args)...);
+ }
+
+ template<int NumArgsLeft,typename... Args>
+ static typename enable_if_c<NumArgsLeft, type>::type
+ call_impl(FRef f,SeqRef seq, Args&&... args)
+ {
+ return call_impl<NumArgsLeft-1>(
+ f,
+ seq,
+ deref(advance_c<NumArgsLeft-1>(
+ fusion::begin(std::forward<SeqRef>(seq))
+ )),
+ std::forward<Args>(args)...);
+ }
+
+ static type
+ call(FRef f,SeqRef seq)
+ {
+ return call_impl<result_of::size<SeqRef>::value>(
+ f,
+ std::forward<SeqRef>(seq));
+ }
+ };
+ }
+
+ template<typename FRef,typename SeqRef>
+ struct invoke_impl
+ : mpl::if_<
+ typename is_base_of<
+ bidirectional_traversal_tag
+ , typename traits::category_of<SeqRef>::type
+ >::type
+ , bidirectional_traversal::invoke_impl<FRef,SeqRef>
+ , forward_traversal::invoke_impl<FRef,SeqRef>
+ >::type
+ {};
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/functional/invocation/detail/no_decltype_or_variadic_templates/invoke.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/functional/invocation/detail/no_decltype_or_variadic_templates/invoke.hpp 2009-07-18 11:47:07 EDT (Sat, 18 Jul 2009)
@@ -0,0 +1,305 @@
+/*=============================================================================
+ 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).
+==============================================================================*/
+
+#ifndef BOOST_FUSION_FUNCTIONAL_INVOCATION_DETAIL_NO_DECLTYPE_OR_VARIADIC_TEMPLATES_INVOKE_HPP
+#define BOOST_FUSION_FUNCTIONAL_INVOCATION_DETAIL_NO_DECLTYPE_OR_VARIADIC_TEMPLATES_INVOKE_HPP
+
+#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/detail/no_decltype_or_variadic_templates/invoke_function_object.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/functional/invocation/detail/no_decltype_or_variadic_templates/invoke_function_object.hpp 2009-07-18 11:47:07 EDT (Sat, 18 Jul 2009)
@@ -0,0 +1,176 @@
+/*=============================================================================
+ 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).
+==============================================================================*/
+
+#ifndef BOOST_FUSION_FUNCTIONAL_INVOCATION_DETAIL_NO_DECLTYPE_OR_VARIADIC_TEMPLATES_INVOKE_FUNCTION_OBJECT_HPP
+#define BOOST_FUSION_FUNCTIONAL_INVOCATION_DETAIL_NO_DECLTYPE_OR_VARIADIC_TEMPLATES_INVOKE_FUNCTION_OBJECT_HPP
+
+#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/detail/no_decltype_or_variadic_templates/invoke_procedure.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/functional/invocation/detail/no_decltype_or_variadic_templates/invoke_procedure.hpp 2009-07-18 11:47:07 EDT (Sat, 18 Jul 2009)
@@ -0,0 +1,170 @@
+/*=============================================================================
+ 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).
+==============================================================================*/
+
+#ifndef BOOST_FUSION_FUNCTIONAL_INVOCATION_DETAIL_NO_DECLTYPE_OR_VARIADIC_TEMPLATES_INVOKE_PROCEDURE_HPP
+#define BOOST_FUSION_FUNCTIONAL_INVOCATION_DETAIL_NO_DECLTYPE_OR_VARIADIC_TEMPLATES_INVOKE_PROCEDURE_HPP
+
+#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

Modified: sandbox/SOC/2009/fusion/boost/fusion/functional/invocation/detail/that_ptr.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/functional/invocation/detail/that_ptr.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/functional/invocation/detail/that_ptr.hpp 2009-07-18 11:47:07 EDT (Sat, 18 Jul 2009)
@@ -16,43 +16,51 @@
 
 namespace boost { namespace fusion { namespace detail
 {
- template <typename Wanted>
+ template<typename WantedRef>
     struct that_ptr
     {
- private:
+ private:
+ typedef typename detail::remove_reference<WantedRef>::type* wanted;
 
- typedef typename remove_reference<Wanted>::type pointee;
-
- template <typename T>
- static inline pointee * do_get_pointer(T &, pointee * x)
+ template<typename T>
+ static inline wanted
+ do_get_pointer(BOOST_FUSION_R_ELSE_LREF(T), wanted ptr)
         {
- return x;
+ return ptr;
         }
- template <typename T>
- static inline pointee * do_get_pointer(T & x, void const *)
+
+ template<typename T>
+ static inline wanted
+ do_get_pointer(BOOST_FUSION_R_ELSE_LREF(T) t, void const*)
         {
- return get_pointer(x);
+ return get_pointer(BOOST_FUSION_FORWARD(T,t));
         }
 
- public:
-
- static inline pointee * get(pointee * x)
+ public:
+ static inline wanted
+ get(WantedRef x)
         {
- return x;
+ return boost::addressof(x);
         }
 
- static inline pointee * get(pointee & x)
+ static inline wanted
+ get(wanted ptr)
         {
- return boost::addressof(x);
+ return ptr;
         }
 
- template <typename T> static inline pointee * get(T & x)
- {
- return do_get_pointer(x, boost::addressof(x));
+ template <typename T>
+ static inline wanted
+ get(BOOST_FUSION_R_ELSE_LREF(T) t)
+ {
+ return do_get_pointer(
+ BOOST_FUSION_FORWARD(T,t),
+ boost::addressof(BOOST_FUSION_FORWARD(T,t)));
         }
     };
 
- template <typename PtrOrSmartPtr> struct non_const_pointee;
+ /*template <typename PtrOrSmartPtr>
+ struct non_const_pointee;
 
     namespace adl_barrier
     {
@@ -79,8 +87,7 @@
     {
         typedef non_const_pointee type;
         typedef bool value_type;
- };
-
+ };*/
 }}}
 
 #endif

Modified: sandbox/SOC/2009/fusion/boost/fusion/functional/invocation/invoke.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/functional/invocation/invoke.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/functional/invocation/invoke.hpp 2009-07-18 11:47:07 EDT (Sat, 18 Jul 2009)
@@ -1,305 +1,18 @@
-/*=============================================================================
- 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).
-==============================================================================*/
+// Copyright Christopher Schmidt 2009.
+// Distributed under 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)
 
 #ifndef BOOST_FUSION_FUNCTIONAL_INVOCATION_INVOKE_HPP
 #define BOOST_FUSION_FUNCTIONAL_INVOCATION_INVOKE_HPP
 
-#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));
- }
- };
+#include <boost/config.hpp>
+#if defined(BOOST_NO_DECLTYPE) || defined(BOOST_NO_VARIADIC_TEMPLATES)
+# include <boost/fusion/functional/invocation/detail/no_decltype_or_variadic_templates/invoke.hpp>
+#else
+# define BOOST_FUSION_INVOKE_NAME invoke
+# include <boost/fusion/functional/invocation/detail/decltype_and_variadic_templates/invoke_impl.hpp>
+# undef BOOST_FUSION_INVOKE_NAME
 #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

Modified: sandbox/SOC/2009/fusion/boost/fusion/functional/invocation/invoke_function_object.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/functional/invocation/invoke_function_object.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/functional/invocation/invoke_function_object.hpp 2009-07-18 11:47:07 EDT (Sat, 18 Jul 2009)
@@ -1,176 +1,18 @@
-/*=============================================================================
- 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).
-==============================================================================*/
+// Copyright Christopher Schmidt 2009.
+// Distributed under 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)
 
 #ifndef BOOST_FUSION_FUNCTIONAL_INVOCATION_INVOKE_FUNCTION_OBJECT_HPP
 #define BOOST_FUSION_FUNCTIONAL_INVOCATION_INVOKE_FUNCTION_OBJECT_HPP
 
-#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
+#include <boost/config.hpp>
+#if defined(BOOST_NO_DECLTYPE) || defined(BOOST_NO_VARIADIC_TEMPLATES)
+# include <boost/fusion/functional/invocation/detail/no_decltype_or_variadic_templates/invoke_function_object.hpp>
+#elif !defined(BOOST_FUSION_CPP0X_NO_DEPRECEATED)
+# define BOOST_FUSION_INVOKE_NAME invoke_function_object
+# include <boost/fusion/functional/invocation/detail/decltype_and_variadic_templates/invoke_impl.hpp>
+# undef BOOST_FUSION_INVOKE_NAME
 #endif
- };
 
-#undef N
-#endif // defined(BOOST_PP_IS_ITERATING)
 #endif

Modified: sandbox/SOC/2009/fusion/boost/fusion/functional/invocation/invoke_procedure.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/functional/invocation/invoke_procedure.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/functional/invocation/invoke_procedure.hpp 2009-07-18 11:47:07 EDT (Sat, 18 Jul 2009)
@@ -1,170 +1,18 @@
-/*=============================================================================
- 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).
-==============================================================================*/
+// Copyright Christopher Schmidt 2009.
+// Distributed under 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)
 
 #ifndef BOOST_FUSION_FUNCTIONAL_INVOCATION_INVOKE_PROCEDURE_HPP
 #define BOOST_FUSION_FUNCTIONAL_INVOCATION_INVOKE_PROCEDURE_HPP
 
-#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,~)
+#include <boost/config.hpp>
+#if defined(BOOST_NO_DECLTYPE) || defined(BOOST_NO_VARIADIC_TEMPLATES)
+# include <boost/fusion/functional/invocation/detail/no_decltype_or_variadic_templates/invoke_procedure.hpp>
+#elif !defined(BOOST_FUSION_CPP0X_NO_DEPRECEATED)
+# define BOOST_FUSION_INVOKE_NAME invoke_procedure
+# include <boost/fusion/functional/invocation/detail/decltype_and_variadic_templates/invoke_impl.hpp>
+# undef BOOST_FUSION_INVOKE_NAME
 #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

Modified: sandbox/SOC/2009/fusion/boost/fusion/functional/invocation/limits.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/functional/invocation/limits.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/functional/invocation/limits.hpp 2009-07-18 11:47:07 EDT (Sat, 18 Jul 2009)
@@ -9,14 +9,18 @@
 #ifndef BOOST_FUSION_FUNCTIONAL_INVOCATION_LIMITS_HPP
 #define BOOST_FUSION_FUNCTIONAL_INVOCATION_LIMITS_HPP
 
-# if !defined(BOOST_FUSION_INVOKE_MAX_ARITY)
+#include <boost/config.hpp>
+
+#if defined(BOOST_NO_VARIADIC_TEMPLATES) || !defined(BOOST_FUSION_CPP0X_NO_DEPRECEATED)
+# ifndef 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
+# ifndef 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
+# ifndef BOOST_FUSION_INVOKE_FUNCTION_OBJECT_MAX_ARITY
+# define BOOST_FUSION_INVOKE_FUNCTION_OBJECT_MAX_ARITY 6
 # endif
+#endif
 
 #endif

Deleted: sandbox/SOC/2009/fusion/boost/fusion/include/make_unfused_lvalue_args.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/include/make_unfused_lvalue_args.hpp 2009-07-18 11:47:07 EDT (Sat, 18 Jul 2009)
+++ (empty file)
@@ -1,13 +0,0 @@
-/*=============================================================================
- Copyright (c) 2001-2007 Joel de Guzman
-
- Distributed under 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)
-==============================================================================*/
-
-#ifndef BOOST_FUSION_INCLUDE_MAKE_UNFUSED_LVALUE_ARGS_HPP
-#define BOOST_FUSION_INCLUDE_MAKE_UNFUSED_LVALUE_ARGS_HPP
-
-#include <boost/fusion/functional/generation/make_unfused_lvalue_args.hpp>
-
-#endif

Deleted: sandbox/SOC/2009/fusion/boost/fusion/include/make_unfused_rvalue_args.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/include/make_unfused_rvalue_args.hpp 2009-07-18 11:47:07 EDT (Sat, 18 Jul 2009)
+++ (empty file)
@@ -1,13 +0,0 @@
-/*=============================================================================
- Copyright (c) 2001-2007 Joel de Guzman
-
- Distributed under 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)
-==============================================================================*/
-
-#ifndef BOOST_FUSION_INCLUDE_MAKE_UNFUSED_RVALUE_ARGS_HPP
-#define BOOST_FUSION_INCLUDE_MAKE_UNFUSED_RVALUE_ARGS_HPP
-
-#include <boost/fusion/functional/generation/make_unfused_rvalue_args.hpp>
-
-#endif

Deleted: sandbox/SOC/2009/fusion/boost/fusion/include/unfused_lvalue_args.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/include/unfused_lvalue_args.hpp 2009-07-18 11:47:07 EDT (Sat, 18 Jul 2009)
+++ (empty file)
@@ -1,13 +0,0 @@
-/*=============================================================================
- Copyright (c) 2001-2007 Joel de Guzman
-
- Distributed under 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)
-==============================================================================*/
-
-#ifndef BOOST_FUSION_INCLUDE_UNFUSED_LVALUE_ARGS_HPP
-#define BOOST_FUSION_INCLUDE_UNFUSED_LVALUE_ARGS_HPP
-
-#include <boost/fusion/functional/adapter/unfused_lvalue_args.hpp>
-
-#endif

Deleted: sandbox/SOC/2009/fusion/boost/fusion/include/unfused_rvalue_args.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/include/unfused_rvalue_args.hpp 2009-07-18 11:47:07 EDT (Sat, 18 Jul 2009)
+++ (empty file)
@@ -1,13 +0,0 @@
-/*=============================================================================
- Copyright (c) 2001-2007 Joel de Guzman
-
- Distributed under 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)
-==============================================================================*/
-
-#ifndef BOOST_FUSION_INCLUDE_UNFUSED_RVALUE_ARGS_HPP
-#define BOOST_FUSION_INCLUDE_UNFUSED_RVALUE_ARGS_HPP
-
-#include <boost/fusion/functional/adapter/unfused_rvalue_args.hpp>
-
-#endif

Modified: sandbox/SOC/2009/fusion/boost/fusion/sequence/intrinsic/begin.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/sequence/intrinsic/begin.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/sequence/intrinsic/begin.hpp 2009-07-18 11:47:07 EDT (Sat, 18 Jul 2009)
@@ -40,8 +40,6 @@
         {};
     }
 
- //TODO cschmidt: const retval?!
-
     template <typename Seq>
     inline typename
         result_of::begin<BOOST_FUSION_R_ELSE_CLREF(Seq)>::type

Modified: sandbox/SOC/2009/fusion/boost/fusion/support/result_of.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/support/result_of.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/support/result_of.hpp 2009-07-18 11:47:07 EDT (Sat, 18 Jul 2009)
@@ -12,7 +12,16 @@
 //Therefore we emulate the old behavior if (and only if) the boost
 //implementation falls back to decltype by default.
 
-#ifndef BOOST_NO_DECLTYPE
+#ifdef BOOST_NO_VARIADIC_TEMPLATES
+# include <boost/mpl/bool.hpp>
+#else
+# include <boost/fusion/support/ref.hpp>
+
+# include <boost/type_traits/remove_pointer.hpp>
+# include <boost/type_traits/is_function.hpp>
+# include <boost/type_traits/is_member_function_pointer.hpp>
+#endif
+#if !defined(BOOST_NO_DECLTYPE) && !defined(BOOST_FUSION_CPP0X_NO_DEPRECEATED)
 # include <boost/fusion/support/ref.hpp>
 
 # include <boost/mpl/has_xxx.hpp>
@@ -23,7 +32,109 @@
 
 namespace boost { namespace fusion { namespace support
 {
-#ifdef BOOST_NO_DECLTYPE
+//cschmidt: a pp implementation won't be worth the effort
+#ifdef BOOST_NO_VARIADIC_TEMPLATES
+ template<typename FRef>
+ struct is_preevaluable
+ : mpl::false_
+ {};
+
+ template<typename FRef>
+ struct preevaluate;
+#else
+ //cschmidt: These metafunction needs to handle
+ //T()
+ //T(&)()
+ //T(cv&)()
+ //T(*)()
+ //T(*cv)()
+ //T(*cv&)()
+ //T(C::*)()
+ //T(C::*cv)()
+ //T(C::*&)()
+ //T(C::*cv&)()
+ //T(C::*)()cv
+ //T(C::*cv)()cv
+ //T(C::*&)()cv
+ //T(C::*cv&)()cv
+ //T(C::*)()cv&
+ //T(C::*cv)()cv&
+ //T(C::*&)()cv&
+ //T(C::*cv&)()cv&
+ //& -> &&
+
+ template<typename FRef>
+ struct is_preevaluable
+ {
+ typedef typename
+ remove_pointer<
+ typename detail::identity<FRef>::type
+ >::type
+ f;
+
+ typedef typename
+ mpl::or_<
+ typename is_function<f>::type
+ , typename is_member_function_pointer<f>::type
+ >::type
+ type;
+ };
+
+ template<typename FRef>
+ struct preevaluate_impl;
+
+ template<typename Result,typename... Args>
+ struct preevaluate_impl<Result (Args...)>
+ {
+ typedef Result type;
+ };
+
+ template<typename Result,typename Class,typename... Args>
+ struct preevaluate_impl<Result(Class::*)(Args...)>
+ {
+ typedef Class& class_type;
+
+ typedef Result type;
+ };
+
+ //TODO cschmidt: Once we got a macro to find out whether the compiler
+ //supports rvalue references for this, use
+ //BOOST_FUSION_ALL_CV_REF_COMBINATIONS
+ template<typename Result,typename Class,typename... Args>
+ struct preevaluate_impl<Result(Class::*)(Args...) const>
+ {
+ typedef Class const& class_type;
+
+ typedef Result type;
+ };
+
+ template<typename Result,typename Class,typename... Args>
+ struct preevaluate_impl<Result(Class::*)(Args...) const volatile>
+ {
+ typedef Class const volatile& class_type;
+
+ typedef Result type;
+ };
+
+ template<typename Result,typename Class,typename... Args>
+ struct preevaluate_impl<Result(Class::*)(Args...) volatile>
+ {
+ typedef Class volatile& class_type;
+
+ typedef Result type;
+ };
+
+ template<typename FRef>
+ struct preevaluate
+ : preevaluate_impl<
+ typename remove_pointer<
+ typename detail::identity<FRef>::type
+ >::type
+ >
+ {};
+#endif
+
+#if defined(BOOST_NO_DECLTYPE) || defined(BOOST_FUSION_CPP0X_NO_DEPRECEATED)
     using boost::result_of;
 #else
     namespace detail

Modified: sandbox/SOC/2009/fusion/boost/fusion/view/single_view/single_view.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/view/single_view/single_view.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/single_view/single_view.hpp 2009-07-18 11:47:07 EDT (Sat, 18 Jul 2009)
@@ -8,7 +8,6 @@
 #ifndef BOOST_FUSION_VIEW_SINGLE_VIEW_SINGLE_VIEW_HPP
 #define BOOST_FUSION_VIEW_SINGLE_VIEW_SINGLE_VIEW_HPP
 
-//TODO save views directly
 //TODO as fusion element?!
 //TODO bidirectional
 

Modified: sandbox/SOC/2009/fusion/build.bat
==============================================================================
--- sandbox/SOC/2009/fusion/build.bat (original)
+++ sandbox/SOC/2009/fusion/build.bat 2009-07-18 11:47:07 EDT (Sat, 18 Jul 2009)
@@ -30,7 +30,7 @@
 )
 
 rem compile...
-%BOOST_ROOT%\bjam --without-python --toolset=%TOOLSET% %2 %3 %4 %5 %6 %7 %8 %9
+%BOOST_ROOT%\bjam -sHOME="z:\projekte\cl_link_frontend\util\boost" --without-python --toolset=%TOOLSET% %2 %3 %4 %5 %6 %7 %8 %9
 goto :eof
 
 :conceptgcc

Modified: sandbox/SOC/2009/fusion/libs/fusion/doc/Jamfile
==============================================================================
--- sandbox/SOC/2009/fusion/libs/fusion/doc/Jamfile (original)
+++ sandbox/SOC/2009/fusion/libs/fusion/doc/Jamfile 2009-07-18 11:47:07 EDT (Sat, 18 Jul 2009)
@@ -6,19 +6,16 @@
 # http://www.boost.org/LICENSE_1_0.txt)
 #==============================================================================
 project boost/libs/fusion/doc ;
-import boostbook ;
-import quickbook ;
+import boostbook : boostbook ;
+using quickbook ;
 
-import os ;
-local BOOST_ROOT = [ os.environ BOOST_ROOT ] ;
-
-boostbook fusion
+boostbook quickbook
     :
         fusion.qbk
     :
- <xsl:param>boost.root=file:///$(BOOST_ROOT)
- <xsl:param>boost.libraries=file:///$(BOOST_ROOT)/boost/libraries.htm
- <xsl:param>html.stylesheet=file:///$(BOOST_ROOT)/doc/html/boostbook.css
+ <xsl:param>boost.root=../../../..
+ <xsl:param>boost.libraries=../../../libraries.htm
+ <xsl:param>html.stylesheet=../../../../doc/html/boostbook.css
         <xsl:param>chunk.section.depth=4
         <xsl:param>chunk.first.sections=1
         <xsl:param>toc.section.depth=3

Modified: sandbox/SOC/2009/fusion/libs/fusion/doc/functional.qbk
==============================================================================
--- sandbox/SOC/2009/fusion/libs/fusion/doc/functional.qbk (original)
+++ sandbox/SOC/2009/fusion/libs/fusion/doc/functional.qbk 2009-07-18 11:47:07 EDT (Sat, 18 Jul 2009)
@@ -13,6 +13,7 @@
 [heading Header]
 
   #include <boost/fusion/functional.hpp>
+ #include <boost/fusion/include/functional.hpp>
 
 [heading Fused and unfused forms]
 
@@ -299,6 +300,7 @@
 [heading Header]
 
   #include <boost/fusion/functional/invocation/invoke.hpp>
+ #include <boost/fusion/include/invoke.hpp>
 
 [heading Example]
     __std_plus_doc__<int> add;
@@ -365,6 +367,7 @@
 [heading Header]
 
   #include <booost/fusion/functional/invocation/invoke_procedure.hpp>
+ #include <boost/fusion/include/invoke_procedure.hpp>
 
 [heading Example]
     __vector__<int,int> v(1,2);
@@ -427,6 +430,7 @@
 [heading Header]
 
   #include <boost/fusion/functional/invocation/invoke_function_object.hpp>
+ #include <boost/fusion/include/invoke_function_object.hpp>
 
 [heading Example]
     struct sub
@@ -543,6 +547,7 @@
 [heading Header]
 
   #include <boost/fusion/functional/invocation/limits.hpp>
+ #include <boost/fusion/include/limits.hpp>
 
 [heading Macros]
 
@@ -589,6 +594,7 @@
 [heading Header]
 
   #include <boost/fusion/functional/adapter/fused.hpp>
+ #include <boost/fusion/include/fused.hpp>
 
 [heading Synopsis]
     template <typename Function>
@@ -668,6 +674,7 @@
 [heading Header]
 
   #include <boost/fusion/functional/adapter/fused_procedure.hpp>
+ #include <boost/fusion/include/fused_procedure.hpp>
 
 [heading Synopsis]
     template <typename Function>
@@ -744,6 +751,7 @@
 [heading Header]
 
   #include <boost/fusion/functional/adapter/fused_function_object.hpp>
+ #include <boost/fusion/include/fused_function_object.hpp>
 
 [heading Synopsis]
     template <class Function>
@@ -849,6 +857,7 @@
 [heading Header]
 
   #include <boost/fusion/functional/adapter/unfused.hpp>
+ #include <boost/fusion/include/unfused.hpp>
 
 [heading Synopsis]
     template <class Function, bool AllowNullary = true>
@@ -922,7 +931,7 @@
 target function. When called, its arguments are bundled to a
 __random_access_sequence__ that is passed to the target function object.
 
-The call operators of esulting function objects are strictly typed
+The call operators of the resulting function objects are strictly typed
 (in other words, non-templatized) with the types from a __sequence__.
 
 The type of the target function is allowed to be const qualified or a
@@ -942,6 +951,7 @@
 [heading Header]
 
   #include <boost/fusion/functional/adapter/unfused_typed.hpp>
+ #include <boost/fusion/include/unfused_typed.hpp>
 
 [heading Synopsis]
     template <class Function, class Sequence>
@@ -1057,6 +1067,7 @@
 [heading Header]
 
   #include <boost/fusion/functional/adapter/limits.hpp>
+ #include <boost/fusion/include/limits.hpp>
 
 [heading Macros]
 

Modified: sandbox/SOC/2009/fusion/libs/fusion/doc/fusion.qbk
==============================================================================
--- sandbox/SOC/2009/fusion/libs/fusion/doc/fusion.qbk (original)
+++ sandbox/SOC/2009/fusion/libs/fusion/doc/fusion.qbk 2009-07-18 11:47:07 EDT (Sat, 18 Jul 2009)
@@ -9,7 +9,7 @@
     [quickbook 1.3]
     [version 2.0]
     [authors [de Guzman, Joel], [Marsden, Dan], [Schwinger, Tobias]]
- [copyright 2001 2002 2003 2004 2005 2006 2007 Joel de Guzman, Dan Marsden, Tobias Schwinger]
+ [copyright 2001 2002 2003 2004 2005 2006 2007 2008 2009 Joel de Guzman, Dan Marsden, Tobias Schwinger]
     [purpose Statically Typed Heterogeneous Data Structures and Algorithms]
     [license
         Distributed under the Boost Software License, Version 1.0.

Modified: sandbox/SOC/2009/fusion/libs/fusion/test/Jamfile
==============================================================================
--- sandbox/SOC/2009/fusion/libs/fusion/test/Jamfile (original)
+++ sandbox/SOC/2009/fusion/libs/fusion/test/Jamfile 2009-07-18 11:47:07 EDT (Sat, 18 Jul 2009)
@@ -95,18 +95,18 @@
     [ run sequence/zip_view.cpp : : : : ]
     [ run sequence/zip_view2.cpp : : : : ]
 
-# [ run functional/fused_function_object.cpp : : : : ]
-# [ run functional/fused_procedure.cpp : : : : ]
-# [ run functional/fused.cpp : : : : ]
-# [ run functional/invoke_function_object.cpp : : : : ]
-# [ run functional/invoke_procedure.cpp : : : : ]
-# [ run functional/invoke.cpp : : : : ]
+# [ run functional/fused_function_object.cpp : : : : ]
+# [ run functional/fused_procedure.cpp : : : : ]
+# [ run functional/fused.cpp : : : : ]
+ [ run functional/invoke_function_object.cpp : : : : ]
+ [ run functional/invoke_procedure.cpp : : : : ]
+ [ run functional/invoke.cpp : : : : ]
 # [ run functional/make_fused_function_object.cpp : : : : ]
 # [ run functional/make_fused_procedure.cpp : : : : ]
 # [ run functional/make_fused.cpp : : : : ]
 # [ run functional/make_unfused.cpp : : : : ]
-# [ run functional/unfused_typed.cpp : : : : ]
-# [ run functional/unfused.cpp : : : : ]
+ [ run functional/unfused_typed.cpp : : : : ]
+ [ run functional/unfused.cpp : : : : ]
 
 # [ compile-fail xxx.cpp : : : : ]
 

Modified: sandbox/SOC/2009/fusion/libs/fusion/test/functional/invoke.cpp
==============================================================================
--- sandbox/SOC/2009/fusion/libs/fusion/test/functional/invoke.cpp (original)
+++ sandbox/SOC/2009/fusion/libs/fusion/test/functional/invoke.cpp 2009-07-18 11:47:07 EDT (Sat, 18 Jul 2009)
@@ -227,8 +227,8 @@
     BOOST_TEST(that.nullary_c() == fusion::invoke(& members::nullary_c, fusion::join(sv_spt_c_ctx,seq)));
 
     // Pointer to data member
-
- BOOST_TEST(that.data == (fusion::invoke(& members::data, fusion::join(sv_obj_ctx,seq)) = that.data));
+ //TODO cschmidt!!!
+ /*BOOST_TEST(that.data == (fusion::invoke(& members::data, fusion::join(sv_obj_ctx,seq)) = that.data));
     BOOST_TEST(that.data == (fusion::invoke(& members::data, fusion::join(sv_ref_ctx,seq)) = that.data));
     BOOST_TEST(that.data == (fusion::invoke(& members::data, fusion::join(sv_ptr_ctx,seq)) = that.data));
     BOOST_TEST(that.data == (fusion::invoke(& members::data, fusion::join(sv_spt_ctx,seq)) = that.data));
@@ -244,7 +244,7 @@
     BOOST_TEST(that.data == fusion::invoke(& members::data, fusion::join(sv_obj_c_d_ctx,seq)));
     BOOST_TEST(that.data == fusion::invoke(& members::data, fusion::join(sv_ref_c_d_ctx,seq)));
     BOOST_TEST(that.data == fusion::invoke(& members::data, fusion::join(sv_ptr_c_d_ctx,seq)));
- BOOST_TEST(that.data == fusion::invoke(& members::data, fusion::join(sv_spt_c_d_ctx,seq)));
+ BOOST_TEST(that.data == fusion::invoke(& members::data, fusion::join(sv_spt_c_d_ctx,seq)));*/
 }
 
 template <class Sequence>

Modified: sandbox/SOC/2009/fusion/libs/fusion/test/functional/invoke_procedure.cpp
==============================================================================
--- sandbox/SOC/2009/fusion/libs/fusion/test/functional/invoke_procedure.cpp (original)
+++ sandbox/SOC/2009/fusion/libs/fusion/test/functional/invoke_procedure.cpp 2009-07-18 11:47:07 EDT (Sat, 18 Jul 2009)
@@ -139,7 +139,7 @@
 
     // Note: The function object is taken by value, so we request the copy
     // to be const with an explicit template argument. We can also request
- // the function object to be pased by reference...
+ // the function object to be passed by reference...
     COMPARE_EFFECT(const_(f)(), fusion::invoke_procedure<fobj const >(const_(f), seq ));
     COMPARE_EFFECT(const_(f)(), fusion::invoke_procedure<fobj const&>(const_(f), const_(seq)));
 

Modified: sandbox/SOC/2009/fusion/libs/fusion/test/sequence/vector_n.cpp
==============================================================================
--- sandbox/SOC/2009/fusion/libs/fusion/test/sequence/vector_n.cpp (original)
+++ sandbox/SOC/2009/fusion/libs/fusion/test/sequence/vector_n.cpp 2009-07-18 11:47:07 EDT (Sat, 18 Jul 2009)
@@ -35,10 +35,10 @@
     using std::endl;
 
     {
- vector0 vec;
+ vector0<> vec;
         (void) vec;
         cout << "(): " << sizeof(vec) << endl;
- cout << (boost::is_empty<vector0>::value ? "is empty" : "is not empty") << endl;
+ cout << (boost::is_empty<vector0<> >::value ? "is empty" : "is not empty") << endl;
     }
 
     {
@@ -211,7 +211,7 @@
 
     {
         // testing copy and assign from a view
- vector0 empty;
+ vector0<> empty;
         fusion::vector2<int, long> v(sequence_assign(fusion::push_back(fusion::push_back(empty, 123), 456)));
         cout << v << endl;
         BOOST_TEST(at_c<0>(v) == 123);

Modified: sandbox/SOC/2009/fusion/project-root.jam
==============================================================================
--- sandbox/SOC/2009/fusion/project-root.jam (original)
+++ sandbox/SOC/2009/fusion/project-root.jam 2009-07-18 11:47:07 EDT (Sat, 18 Jul 2009)
@@ -23,7 +23,7 @@
 #build-project workaround/conceptgcc/test/mini-fusion ;
 build-project libs/fusion/example/test ;
 
-build-project libs/fusion/doc ;
+#build-project libs/fusion/doc ;
 #build-project libs/fusion/example/extension ;
-build-project libs/fusion/example/performance ;
+#build-project libs/fusion/example/performance ;
 build-project libs/fusion/test ;
\ No newline at end of file


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk