|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r55022 - in sandbox/SOC/2009/fusion: . boost/fusion/algorithm/iteration/detail boost/fusion/algorithm/transformation/detail boost/fusion/functional/adapter/detail/decltype_and_variadic_templates boost/fusion/functional/generation boost/fusion/functional/generation/detail boost/fusion/functional/invocation/detail/decltype_and_variadic_templates boost/fusion/support boost/fusion/support/detail boost/fusion/view/detail boost/fusion/view/zip_view boost/fusion/view/zip_view/detail libs/fusion/doc libs/fusion/example/performance libs/fusion/test libs/fusion/test/algorithm libs/fusion/test/functional libs/fusion/test/sequence
From: mr.chr.schmidt_at_[hidden]
Date: 2009-07-18 17:08:56
Author: cschmidt
Date: 2009-07-18 17:08:50 EDT (Sat, 18 Jul 2009)
New Revision: 55022
URL: http://svn.boost.org/trac/boost/changeset/55022
Log:
it's done. all testcases compile fine. I am out for now.
Text files modified:
sandbox/SOC/2009/fusion/boost/fusion/algorithm/iteration/detail/fold.hpp | 53 +++++++++++++++++----------
sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/detail/replace_if.hpp | 4 +-
sandbox/SOC/2009/fusion/boost/fusion/functional/adapter/detail/decltype_and_variadic_templates/fused_impl.hpp | 77 +++++++++++++++++++++++++++++++++++++++
sandbox/SOC/2009/fusion/boost/fusion/functional/adapter/detail/decltype_and_variadic_templates/unfused_impl.hpp | 11 +++--
sandbox/SOC/2009/fusion/boost/fusion/functional/generation/detail/gen_make_adapter.hpp | 5 --
sandbox/SOC/2009/fusion/boost/fusion/functional/generation/make_fused.hpp | 10 +++-
sandbox/SOC/2009/fusion/boost/fusion/functional/generation/make_fused_function_object.hpp | 10 +++-
sandbox/SOC/2009/fusion/boost/fusion/functional/generation/make_fused_procedure.hpp | 10 +++-
sandbox/SOC/2009/fusion/boost/fusion/functional/generation/make_unfused.hpp | 10 +++-
sandbox/SOC/2009/fusion/boost/fusion/functional/invocation/detail/decltype_and_variadic_templates/invoke_impl.hpp | 1
sandbox/SOC/2009/fusion/boost/fusion/support/deduce_sequence.hpp | 4 +-
sandbox/SOC/2009/fusion/boost/fusion/support/detail/as_fusion_element.hpp | 6 +++
sandbox/SOC/2009/fusion/boost/fusion/support/result_of.hpp | 14 +++---
sandbox/SOC/2009/fusion/boost/fusion/view/detail/strictest_traversal.hpp | 4 +-
sandbox/SOC/2009/fusion/boost/fusion/view/zip_view/detail/advance_impl.hpp | 4 +-
sandbox/SOC/2009/fusion/boost/fusion/view/zip_view/detail/at_impl.hpp | 4 +-
sandbox/SOC/2009/fusion/boost/fusion/view/zip_view/detail/begin_impl.hpp | 4 +-
sandbox/SOC/2009/fusion/boost/fusion/view/zip_view/detail/deref_impl.hpp | 4 +-
sandbox/SOC/2009/fusion/boost/fusion/view/zip_view/detail/end_impl.hpp | 4 +-
sandbox/SOC/2009/fusion/boost/fusion/view/zip_view/detail/next_impl.hpp | 4 +-
sandbox/SOC/2009/fusion/boost/fusion/view/zip_view/detail/prior_impl.hpp | 4 +-
sandbox/SOC/2009/fusion/boost/fusion/view/zip_view/detail/value_at_impl.hpp | 4 +-
sandbox/SOC/2009/fusion/boost/fusion/view/zip_view/detail/value_of_impl.hpp | 4 +-
sandbox/SOC/2009/fusion/boost/fusion/view/zip_view/zip_view.hpp | 13 ++++--
sandbox/SOC/2009/fusion/libs/fusion/doc/view.qbk | 4 +-
sandbox/SOC/2009/fusion/libs/fusion/example/performance/accumulate.cpp | 12 +++---
sandbox/SOC/2009/fusion/libs/fusion/example/performance/inner_product.cpp | 12 +++---
sandbox/SOC/2009/fusion/libs/fusion/example/performance/inner_product2.cpp | 18 ++++----
sandbox/SOC/2009/fusion/libs/fusion/example/performance/sequence_efficiency.cpp | 6 +-
sandbox/SOC/2009/fusion/libs/fusion/example/performance/zip_efficiency.cpp | 2
sandbox/SOC/2009/fusion/libs/fusion/test/Jamfile | 14 +++---
sandbox/SOC/2009/fusion/libs/fusion/test/algorithm/fold.cpp | 14 +++----
sandbox/SOC/2009/fusion/libs/fusion/test/algorithm/transform.cpp | 26 +++----------
sandbox/SOC/2009/fusion/libs/fusion/test/functional/invoke.cpp | 2
sandbox/SOC/2009/fusion/libs/fusion/test/functional/make_unfused.cpp | 2
sandbox/SOC/2009/fusion/libs/fusion/test/sequence/transform_view.cpp | 18 +--------
sandbox/SOC/2009/fusion/project-root.jam | 2
37 files changed, 243 insertions(+), 157 deletions(-)
Modified: sandbox/SOC/2009/fusion/boost/fusion/algorithm/iteration/detail/fold.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/algorithm/iteration/detail/fold.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/algorithm/iteration/detail/fold.hpp 2009-07-18 17:08:50 EDT (Sat, 18 Jul 2009)
@@ -125,13 +125,23 @@
template <typename It, typename StateRef, typename FRef>
struct fold_apply
- : support::result_of<
- FRef(
- typename result_of::deref<It>::type
- , StateRef
- )
- >
- {};
+ {
+ typedef typename result_of::deref<It>::type deref_type;
+
+#ifdef BOOST_NO_RVALUE_REFERENCES
+ typedef typename
+ support::result_of<FRef(deref_type, StateRef)>::type
+ type;
+#else
+ typedef typename
+ mpl::eval_if<
+ typename detail::is_lrref<deref_type>::type
+ , support::result_of<FRef(deref_type, StateRef)>
+ , support::result_of<FRef(deref_type&&, StateRef)>
+ >::type
+ type;
+#endif
+ };
template<typename It0, typename StateRef, typename FRef, int N>
struct result_of_unrolled_fold
@@ -193,20 +203,23 @@
template<int SeqSize, typename It0, typename StateRef, typename FRef>
struct fold_impl
- : result_of_unrolled_fold<It0, StateRef, FRef, SeqSize>
{
- typedef typename
- result_of_unrolled_fold<It0, StateRef, FRef, SeqSize>::type
- type;
-
- static type
- call(It0 const& it0, StateRef state, FRef f)
- {
- return unrolled_fold<SeqSize>::template call<type>(
- it0,
- BOOST_FUSION_FORWARD(StateRef,state),
- BOOST_FUSION_FORWARD(FRef,f));
- }
+ typedef typename
+ mpl::eval_if<
+ typename support::is_preevaluable<FRef>::type
+ , support::preevaluate<FRef>
+ , result_of_unrolled_fold<It0, StateRef, FRef, SeqSize>
+ >::type
+ type;
+
+ static type
+ call(It0 const& it0, StateRef state, FRef f)
+ {
+ return unrolled_fold<SeqSize>::template call<type>(
+ it0,
+ BOOST_FUSION_FORWARD(StateRef,state),
+ BOOST_FUSION_FORWARD(FRef,f));
+ }
};
template<typename It0, typename StateRef, typename FRef>
Modified: sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/detail/replace_if.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/detail/replace_if.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/detail/replace_if.hpp 2009-07-18 17:08:50 EDT (Sat, 18 Jul 2009)
@@ -51,8 +51,8 @@
template<typename Params>
struct result;
- template <typename U>
- struct result<replace_if_helper<F, NewValue>(U)>
+ template<typename Self, typename U>
+ struct result<Self(U)>
{
typedef typename
mpl::if_<
Modified: sandbox/SOC/2009/fusion/boost/fusion/functional/adapter/detail/decltype_and_variadic_templates/fused_impl.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/functional/adapter/detail/decltype_and_variadic_templates/fused_impl.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/functional/adapter/detail/decltype_and_variadic_templates/fused_impl.hpp 2009-07-18 17:08:50 EDT (Sat, 18 Jul 2009)
@@ -2,3 +2,80 @@
// 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/invoke.hpp>
+#include <boost/fusion/support/ref.hpp>
+#include <boost/fusion/support/result_of.hpp>
+
+#include <boost/preprocessor/empty.hpp>
+
+namespace boost { namespace fusion
+{
+ template<typename F>
+ 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
+
+#define CALL_OPERATOR(COMBINATION)\
+ template<typename Seq>\
+ typename result_of::invoke<\
+ typename detail::forward_as<int COMBINATION, F>::type, Seq&&\
+ >::type\
+ operator()(Seq&& seq) COMBINATION\
+ {\
+ return\
+ invoke<typename detail::forward_as<int COMBINATION, F>::type>(\
+ f,std::forward<Seq>(seq));\
+ }
+
+ CALL_OPERATOR(BOOST_PP_EMPTY());
+ CALL_OPERATOR(const);
+ //TODO !!!
+ //CALL_OPERATOR(volatile);
+ //CALL_OPERATOR(const volatile);
+
+#undef CALL_OPERATOR
+
+ F f;
+ };
+}}
+
+#undef BOOST_FUSION_ADAPTER_NAME
+
Modified: sandbox/SOC/2009/fusion/boost/fusion/functional/adapter/detail/decltype_and_variadic_templates/unfused_impl.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/functional/adapter/detail/decltype_and_variadic_templates/unfused_impl.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/functional/adapter/detail/decltype_and_variadic_templates/unfused_impl.hpp 2009-07-18 17:08:50 EDT (Sat, 18 Jul 2009)
@@ -18,6 +18,8 @@
# define BOOST_FUSION_ADAPTER_NAME unfused
#endif
+//TODO cschmidt: handle rvalue ref F
+
namespace boost { namespace fusion
{
template<
@@ -73,7 +75,8 @@
# define CALL_OPERATOR(COMBINATION)\
template<typename... Args>\
typename support::result_of<\
- F(typename result_of::as_vector<TransformSeq&&>::type)\
+ typename detail::forward_as<int COMBINATION, F>::type\
+ (typename result_of::as_vector<TransformSeq&&>::type&&)\
>::type\
operator()(Args&&... args) COMBINATION\
{\
@@ -84,7 +87,8 @@
# define CALL_OPERATOR(COMBINATION)\
template<typename... Args>\
typename support::result_of<\
- F(typename result_of::vector_tie<Args&&...>::type)\
+ typename detail::forward_as<int COMBINATION, F>::type\
+ (typename result_of::vector_tie<Args&&...>::type&&)\
>::type\
operator()(Args&&... args) COMBINATION\
{\
@@ -96,9 +100,8 @@
CALL_OPERATOR(const);
CALL_OPERATOR(volatile);
CALL_OPERATOR(const volatile);
-#
+
#undef CALL_OPERATOR
-#undef OUTER_GEENRATOR
F f;
};
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 17:08:50 EDT (Sat, 18 Jul 2009)
@@ -6,8 +6,6 @@
http://www.boost.org/LICENSE_1_0.txt).
==============================================================================*/
-// No include guard - this file is included multiple times intentionally.
-
#include <boost/fusion/support/ref.hpp>
#include <boost/fusion/support/detail/as_fusion_element.hpp>
@@ -30,7 +28,7 @@
};
}
- template <typename F>
+ template<typename 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)
@@ -42,5 +40,4 @@
}}
#undef BOOST_FUSION_CLASS_TPL_NAME
-#undef BOOST_FUSION_FUNC_NAME
Modified: sandbox/SOC/2009/fusion/boost/fusion/functional/generation/make_fused.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/functional/generation/make_fused.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/functional/generation/make_fused.hpp 2009-07-18 17:08:50 EDT (Sat, 18 Jul 2009)
@@ -9,9 +9,13 @@
#ifndef BOOST_FUSION_FUNCTIONAL_GENERATION_MAKE_FUSED_HPP
#define BOOST_FUSION_FUNCTIONAL_GENERATION_MAKE_FUSED_HPP
-#include <boost/fusion/functional/adapter/fused.hpp>
+#include <boost/config.hpp>
+#if defined(BOOST_NO_DECLTYPE) || defined(BOOST_NO_VARIADIC_TEMPLATES) || !defined(BOOST_FUSION_CPP0X_NO_DEPRECEATED)
+# include <boost/fusion/functional/adapter/fused.hpp>
-#define BOOST_FUSION_CLASS_TPL_NAME fused
-#include <boost/fusion/functional/generation/detail/gen_make_adapter.hpp>
+# define BOOST_FUSION_CLASS_TPL_NAME fused
+# include <boost/fusion/functional/generation/detail/gen_make_adapter.hpp>
+# undef BOOST_FUSION_CLASS_TPL_NAME
+#endif
#endif
Modified: sandbox/SOC/2009/fusion/boost/fusion/functional/generation/make_fused_function_object.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/functional/generation/make_fused_function_object.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/functional/generation/make_fused_function_object.hpp 2009-07-18 17:08:50 EDT (Sat, 18 Jul 2009)
@@ -9,9 +9,13 @@
#ifndef BOOST_FUSION_FUNCTIONAL_GENERATION_MAKE_FUSED_FUNCTION_OBJECT_HPP
#define BOOST_FUSION_FUNCTIONAL_GENERATION_MAKE_FUSED_FUNCTION_OBJECT_HPP
-#include <boost/fusion/functional/adapter/fused_function_object.hpp>
+#include <boost/config.hpp>
+#if defined(BOOST_NO_DECLTYPE) || defined(BOOST_NO_VARIADIC_TEMPLATES) || !defined(BOOST_FUSION_CPP0X_NO_DEPRECEATED)
+# include <boost/fusion/functional/adapter/fused_function_object.hpp>
-#define BOOST_FUSION_CLASS_TPL_NAME fused_function_object
-#include <boost/fusion/functional/generation/detail/gen_make_adapter.hpp>
+# define BOOST_FUSION_CLASS_TPL_NAME fused_function_object
+# include <boost/fusion/functional/generation/detail/gen_make_adapter.hpp>
+# undef BOOST_FUSION_CLASS_TPL_NAME
+#endif
#endif
Modified: sandbox/SOC/2009/fusion/boost/fusion/functional/generation/make_fused_procedure.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/functional/generation/make_fused_procedure.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/functional/generation/make_fused_procedure.hpp 2009-07-18 17:08:50 EDT (Sat, 18 Jul 2009)
@@ -9,9 +9,13 @@
#ifndef BOOST_FUSION_FUNCTIONAL_GENERATION_MAKE_FUSED_PROCEDURE_HPP
#define BOOST_FUSION_FUNCTIONAL_GENERATION_MAKE_FUSED_PROCEDURE_HPP
-#include <boost/fusion/functional/adapter/fused_procedure.hpp>
+#include <boost/config.hpp>
+#if defined(BOOST_NO_DECLTYPE) || defined(BOOST_NO_VARIADIC_TEMPLATES) || !defined(BOOST_FUSION_CPP0X_NO_DEPRECEATED)
+# include <boost/fusion/functional/adapter/fused_procedure.hpp>
-#define BOOST_FUSION_CLASS_TPL_NAME fused_procedure
-#include <boost/fusion/functional/generation/detail/gen_make_adapter.hpp>
+# define BOOST_FUSION_CLASS_TPL_NAME fused_procedure
+# include <boost/fusion/functional/generation/detail/gen_make_adapter.hpp>
+# undef BOOST_FUSION_CLASS_TPL_NAME
+#endif
#endif
Modified: sandbox/SOC/2009/fusion/boost/fusion/functional/generation/make_unfused.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/functional/generation/make_unfused.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/functional/generation/make_unfused.hpp 2009-07-18 17:08:50 EDT (Sat, 18 Jul 2009)
@@ -9,9 +9,13 @@
#ifndef BOOST_FUSION_FUNCTIONAL_GENERATION_MAKE_UNFUSED_HPP
#define BOOST_FUSION_FUNCTIONAL_GENERATION_MAKE_UNFUSED_HPP
-#include <boost/fusion/functional/adapter/unfused.hpp>
+#include <boost/config.hpp>
+# if defined(BOOST_NO_DECLTYPE) || defined(BOOST_NO_VARIADIC_TEMPLATES) || !defined(BOOST_FUSION_CPP0X_NO_DEPRECEATED)
+# include <boost/fusion/functional/adapter/unfused.hpp>
-#define BOOST_FUSION_CLASS_TPL_NAME unfused
-#include <boost/fusion/functional/generation/detail/gen_make_adapter.hpp>
+# define BOOST_FUSION_CLASS_TPL_NAME unfused
+# include <boost/fusion/functional/generation/detail/gen_make_adapter.hpp>
+# undef BOOST_FUSION_CLASS_TPL_NAME
+#endif
#endif
Modified: sandbox/SOC/2009/fusion/boost/fusion/functional/invocation/detail/decltype_and_variadic_templates/invoke_impl.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/functional/invocation/detail/decltype_and_variadic_templates/invoke_impl.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/functional/invocation/detail/decltype_and_variadic_templates/invoke_impl.hpp 2009-07-18 17:08:50 EDT (Sat, 18 Jul 2009)
@@ -23,6 +23,7 @@
};
}
+ //TODO cschmidt: ?!?
template <typename F, typename Seq>
inline typename result_of::BOOST_FUSION_INVOKE_NAME<F, Seq&&>::type
BOOST_FUSION_INVOKE_NAME(F f, Seq&& seq)
Modified: sandbox/SOC/2009/fusion/boost/fusion/support/deduce_sequence.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/support/deduce_sequence.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/support/deduce_sequence.hpp 2009-07-18 17:08:50 EDT (Sat, 18 Jul 2009)
@@ -24,8 +24,8 @@
template <typename Sig>
struct result;
- template<typename T>
- struct result<deducer(T)>
+ template<typename Self,typename T>
+ struct result<Self(T)>
: fusion::traits::deduce<T>
{};
};
Modified: sandbox/SOC/2009/fusion/boost/fusion/support/detail/as_fusion_element.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/support/detail/as_fusion_element.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/support/detail/as_fusion_element.hpp 2009-07-18 17:08:50 EDT (Sat, 18 Jul 2009)
@@ -26,6 +26,12 @@
typedef T type;
};
+ template <typename T>
+ struct as_fusion_element<reference_wrapper<T> >
+ {
+ typedef T& type;
+ };
+
#define CV_REF_SPECIALISATION(COMBINATION,_)\
template <typename T>\
struct as_fusion_element<T COMBINATION>\
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 17:08:50 EDT (Sat, 18 Jul 2009)
@@ -141,19 +141,19 @@
{
BOOST_MPL_HAS_XXX_TRAIT_DEF(result_type)
- template<typename F>
+ template<typename IdentityF>
struct get_result_type
{
- typedef typename F::result_type type;
+ typedef typename IdentityF::result_type type;
};
- template<typename F, typename Sig>
+ template<typename IdentityF, typename Sig>
struct get_result
- : F::template result<Sig>
+ : IdentityF::template result<Sig>
{};
//TODO cschmidt: non-native variadic templates version
- template<typename IdentityF, typename... Args>
+ template<typename F,typename IdentityF, typename... Args>
struct result_of_class_type
{
typedef typename
@@ -163,7 +163,7 @@
//TODO cschmidt: fallback to boost::result_of (decltype) if
//'F::template result' does not exist.
//Is this even possible?
- , detail::get_result<IdentityF,IdentityF(Args...)>
+ , detail::get_result<IdentityF,F(Args...)>
>::type
type;
};
@@ -185,7 +185,7 @@
mpl::eval_if<
is_function<f>
, boost::result_of<F(Args...)>
- , detail::result_of_class_type<f,Args...>
+ , detail::result_of_class_type<F,f,Args...>
>::type
type;
};
Modified: sandbox/SOC/2009/fusion/boost/fusion/view/detail/strictest_traversal.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/view/detail/strictest_traversal.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/detail/strictest_traversal.hpp 2009-07-18 17:08:50 EDT (Sat, 18 Jul 2009)
@@ -43,8 +43,8 @@
template<typename Sig>
struct result;
- template<typename Next, typename StrictestSoFar>
- struct result<strictest_traversal_impl(Next, StrictestSoFar)>
+ template<typename Self, typename Next, typename StrictestSoFar>
+ struct result<Self(Next, StrictestSoFar)>
{
typedef typename traits::category_of<Next>::type next_tag;
Modified: sandbox/SOC/2009/fusion/boost/fusion/view/zip_view/detail/advance_impl.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/view/zip_view/detail/advance_impl.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/zip_view/detail/advance_impl.hpp 2009-07-18 17:08:50 EDT (Sat, 18 Jul 2009)
@@ -22,8 +22,8 @@
template<typename Sig>
struct result;
- template<typename N1, typename It>
- struct result<poly_advance<N1>(It)>
+ template<typename Self, typename It>
+ struct result<Self(It)>
{
typedef typename result_of::advance<It,N>::type type;
};
Modified: sandbox/SOC/2009/fusion/boost/fusion/view/zip_view/detail/at_impl.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/view/zip_view/detail/at_impl.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/zip_view/detail/at_impl.hpp 2009-07-18 17:08:50 EDT (Sat, 18 Jul 2009)
@@ -31,8 +31,8 @@
template<typename T>
struct result;
- template<typename N1, typename SeqRef>
- struct result<poly_at<N1>(SeqRef)>
+ template<typename Self, typename SeqRef>
+ struct result<Self(SeqRef)>
: mpl::eval_if<is_same<SeqRef, unused_type const&>
, mpl::identity<unused_type const&>
, result_of::at<SeqRef, N>
Modified: sandbox/SOC/2009/fusion/boost/fusion/view/zip_view/detail/begin_impl.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/view/zip_view/detail/begin_impl.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/zip_view/detail/begin_impl.hpp 2009-07-18 17:08:50 EDT (Sat, 18 Jul 2009)
@@ -28,8 +28,8 @@
template<typename T>
struct result;
- template<typename SeqRef>
- struct result<poly_begin(SeqRef)>
+ template<typename Self, typename SeqRef>
+ struct result<Self(SeqRef)>
: mpl::eval_if<is_same<SeqRef, unused_type const&>
, mpl::identity<unused_type const&>
, result_of::begin<SeqRef>
Modified: sandbox/SOC/2009/fusion/boost/fusion/view/zip_view/detail/deref_impl.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/view/zip_view/detail/deref_impl.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/zip_view/detail/deref_impl.hpp 2009-07-18 17:08:50 EDT (Sat, 18 Jul 2009)
@@ -28,8 +28,8 @@
template<typename Sig>
struct result;
- template<typename ItRef>
- struct result<poly_deref(ItRef)>
+ template<typename Self, typename ItRef>
+ struct result<Self(ItRef)>
{
//TODO cschmidt: ?!
typedef typename
Modified: sandbox/SOC/2009/fusion/boost/fusion/view/zip_view/detail/end_impl.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/view/zip_view/detail/end_impl.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/zip_view/detail/end_impl.hpp 2009-07-18 17:08:50 EDT (Sat, 18 Jul 2009)
@@ -41,8 +41,8 @@
template<typename T>
struct result;
- template<typename M1, typename SeqRef>
- struct result<endpoints<M1>(SeqRef)>
+ template<typename Self, typename SeqRef>
+ struct result<Self(SeqRef)>
: mpl::eval_if<is_same<SeqRef, unused_type const&>
, mpl::identity<unused_type const&>
, get_endpoint<SeqRef, M>
Modified: sandbox/SOC/2009/fusion/boost/fusion/view/zip_view/detail/next_impl.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/view/zip_view/detail/next_impl.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/zip_view/detail/next_impl.hpp 2009-07-18 17:08:50 EDT (Sat, 18 Jul 2009)
@@ -27,8 +27,8 @@
template<typename Sig>
struct result;
- template<typename It>
- struct result<poly_next(It)>
+ template<typename Self, typename It>
+ struct result<Self(It)>
{
typedef typename
mpl::eval_if<
Modified: sandbox/SOC/2009/fusion/boost/fusion/view/zip_view/detail/prior_impl.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/view/zip_view/detail/prior_impl.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/zip_view/detail/prior_impl.hpp 2009-07-18 17:08:50 EDT (Sat, 18 Jul 2009)
@@ -27,8 +27,8 @@
template<typename Sig>
struct result;
- template<typename ItRef>
- struct result<poly_prior(ItRef)>
+ template<typename Self, typename ItRef>
+ struct result<Self(ItRef)>
{
typedef typename
mpl::eval_if<
Modified: sandbox/SOC/2009/fusion/boost/fusion/view/zip_view/detail/value_at_impl.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/view/zip_view/detail/value_at_impl.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/zip_view/detail/value_at_impl.hpp 2009-07-18 17:08:50 EDT (Sat, 18 Jul 2009)
@@ -28,8 +28,8 @@
template<typename T>
struct result;
- template<typename N1, typename Seq>
- struct result<poly_value_at<N1>(Seq)>
+ template<typename Self, typename Seq>
+ struct result<Self(Seq)>
: mpl::eval_if<
is_same<Seq, unused_type const&>
, mpl::identity<unused_type const&>
Modified: sandbox/SOC/2009/fusion/boost/fusion/view/zip_view/detail/value_of_impl.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/view/zip_view/detail/value_of_impl.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/zip_view/detail/value_of_impl.hpp 2009-07-18 17:08:50 EDT (Sat, 18 Jul 2009)
@@ -27,8 +27,8 @@
template<typename T>
struct result;
- template<typename ItRef>
- struct result<poly_value_of(ItRef)>
+ template<typename Self, typename ItRef>
+ struct result<Self(ItRef)>
: mpl::eval_if<
is_same<ItRef, unused_type const&>
, mpl::identity<unused_type const&>
Modified: sandbox/SOC/2009/fusion/boost/fusion/view/zip_view/zip_view.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/view/zip_view/zip_view.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/zip_view/zip_view.hpp 2009-07-18 17:08:50 EDT (Sat, 18 Jul 2009)
@@ -67,8 +67,8 @@
template<typename Params>
struct result;
- template<typename Seq>
- struct result<seq_size(Seq)>
+ template<typename Self,typename Seq>
+ struct result<Self(Seq)>
{
typedef typename
mpl::eval_if<
@@ -87,9 +87,12 @@
template<typename T>
struct result;
- template<typename MinSize, typename SeqSize>
- struct result<poly_min(MinSize, SeqSize)>
- : mpl::min<MinSize, typename detail::remove_reference<SeqSize>::type >
+ template<typename Self,typename MinSize, typename SeqSize>
+ struct result<Self(MinSize, SeqSize)>
+ : mpl::min<
+ typename detail::remove_reference<MinSize>::type,
+ typename detail::remove_reference<SeqSize>::type
+ >
{
};
};
Modified: sandbox/SOC/2009/fusion/libs/fusion/doc/view.qbk
==============================================================================
--- sandbox/SOC/2009/fusion/libs/fusion/doc/view.qbk (original)
+++ sandbox/SOC/2009/fusion/libs/fusion/doc/view.qbk 2009-07-18 17:08:50 EDT (Sat, 18 Jul 2009)
@@ -399,8 +399,8 @@
template<typename Sig>
struct result;
- template<typename U>
- struct result<square(U)>
+ template<typename Self,typename U>
+ struct result<Self(U)>
: remove_reference<U>
{};
Modified: sandbox/SOC/2009/fusion/libs/fusion/example/performance/accumulate.cpp
==============================================================================
--- sandbox/SOC/2009/fusion/libs/fusion/example/performance/accumulate.cpp (original)
+++ sandbox/SOC/2009/fusion/libs/fusion/example/performance/accumulate.cpp 2009-07-18 17:08:50 EDT (Sat, 18 Jul 2009)
@@ -82,9 +82,9 @@
template<typename Sig>
struct result;
- template<typename Lhs, typename Rhs>
- struct result<poly_add(Lhs,Rhs)>
- : boost::remove_reference<Lhs>
+ template<typename Self,typename Lhs, typename Rhs>
+ struct result<Self(Lhs,Rhs)>
+ : boost::fusion::detail::remove_reference<Lhs>
{};
template<typename Lhs, typename Rhs>
@@ -99,9 +99,9 @@
template<typename Sig>
struct result;
- template<typename Lhs, typename Rhs>
- struct result<poly_mult(Lhs, Rhs)>
- : boost::remove_reference<Lhs>
+ template<typename Self,typename Lhs, typename Rhs>
+ struct result<Self(Lhs, Rhs)>
+ : boost::fusion::detail::remove_reference<Lhs>
{};
template<typename Lhs, typename Rhs>
Modified: sandbox/SOC/2009/fusion/libs/fusion/example/performance/inner_product.cpp
==============================================================================
--- sandbox/SOC/2009/fusion/libs/fusion/example/performance/inner_product.cpp (original)
+++ sandbox/SOC/2009/fusion/libs/fusion/example/performance/inner_product.cpp 2009-07-18 17:08:50 EDT (Sat, 18 Jul 2009)
@@ -42,9 +42,9 @@
template<typename Sig>
struct result;
- template<typename Lhs, typename Rhs>
- struct result<poly_add(Lhs, Rhs)>
- : boost::remove_reference<Lhs>
+ template<typename Self,typename Lhs, typename Rhs>
+ struct result<Self(Lhs, Rhs)>
+ : boost::fusion::detail::remove_reference<Lhs>
{};
template<typename Lhs, typename Rhs>
@@ -59,9 +59,9 @@
template<typename Sig>
struct result;
- template<typename Lhs, typename Rhs>
- struct result<poly_mult(Lhs, Rhs)>
- : boost::remove_reference<Lhs>
+ template<typename Self,typename Lhs, typename Rhs>
+ struct result<Self(Lhs, Rhs)>
+ : boost::fusion::detail::remove_reference<Lhs>
{};
template<typename Lhs, typename Rhs>
Modified: sandbox/SOC/2009/fusion/libs/fusion/example/performance/inner_product2.cpp
==============================================================================
--- sandbox/SOC/2009/fusion/libs/fusion/example/performance/inner_product2.cpp (original)
+++ sandbox/SOC/2009/fusion/libs/fusion/example/performance/inner_product2.cpp 2009-07-18 17:08:50 EDT (Sat, 18 Jul 2009)
@@ -42,9 +42,9 @@
template<typename Sig>
struct result;
- template<typename Lhs, typename Rhs>
- struct result<poly_add(Lhs, Rhs)>
- : boost::remove_reference<Lhs>
+ template<typename Self,typename Lhs, typename Rhs>
+ struct result<Self(Lhs, Rhs)>
+ : boost::fusion::detail::remove_reference<Lhs>
{};
template<typename Lhs, typename Rhs>
@@ -59,9 +59,9 @@
template<typename Sig>
struct result;
- template<typename Lhs, typename Rhs>
- struct result<poly_mult(Lhs, Rhs)>
- : boost::remove_reference<Lhs>
+ template<typename Self,typename Lhs, typename Rhs>
+ struct result<Self(Lhs, Rhs)>
+ : boost::fusion::detail::remove_reference<Lhs>
{};
template<typename Lhs, typename Rhs>
@@ -119,9 +119,9 @@
template<typename Sig>
struct result;
- template<typename Lhs, typename Rhs>
- struct result<poly_combine(Lhs, Rhs)>
- : boost::fusion::detail::remove_reference<Rhs>
+ template<typename Self,typename Lhs, typename Rhs>
+ struct result<Self(Lhs, Rhs)>
+ : boost::fusion::detail::remove_reference<Rhs>
{};
template<typename Lhs, typename Rhs>
Modified: sandbox/SOC/2009/fusion/libs/fusion/example/performance/sequence_efficiency.cpp
==============================================================================
--- sandbox/SOC/2009/fusion/libs/fusion/example/performance/sequence_efficiency.cpp (original)
+++ sandbox/SOC/2009/fusion/libs/fusion/example/performance/sequence_efficiency.cpp 2009-07-18 17:08:50 EDT (Sat, 18 Jul 2009)
@@ -65,9 +65,9 @@
template<typename Sig>
struct result;
- template<typename Lhs, typename Rhs>
- struct result<poly_add(Lhs, Rhs)>
- : boost::remove_reference<Lhs>
+ template<typename Self,typename Lhs, typename Rhs>
+ struct result<Self(Lhs, Rhs)>
+ : boost::fusion::detail::remove_reference<Lhs>
{};
template<typename Lhs, typename Rhs>
Modified: sandbox/SOC/2009/fusion/libs/fusion/example/performance/zip_efficiency.cpp
==============================================================================
--- sandbox/SOC/2009/fusion/libs/fusion/example/performance/zip_efficiency.cpp (original)
+++ sandbox/SOC/2009/fusion/libs/fusion/example/performance/zip_efficiency.cpp 2009-07-18 17:08:50 EDT (Sat, 18 Jul 2009)
@@ -30,7 +30,7 @@
struct result
{
typedef typename
- boost::remove_reference<
+ fusion::detail::remove_reference<
typename boost::fusion::result_of::value_at_c<Lhs, 0>::type
>::type
type;
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 17:08:50 EDT (Sat, 18 Jul 2009)
@@ -95,16 +95,16 @@
[ 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/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/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 : : : : ]
Modified: sandbox/SOC/2009/fusion/libs/fusion/test/algorithm/fold.cpp
==============================================================================
--- sandbox/SOC/2009/fusion/libs/fusion/test/algorithm/fold.cpp (original)
+++ sandbox/SOC/2009/fusion/libs/fusion/test/algorithm/fold.cpp 2009-07-18 17:08:50 EDT (Sat, 18 Jul 2009)
@@ -34,8 +34,8 @@
template<typename T>
struct result;
- template <typename T, typename State>
- struct result<add_ints_only(T,State)>
+ template <typename Self,typename T, typename State>
+ struct result<Self(T,State)>
{
//TODO cschmidt: remove_reference does not support rvalue refs yet,
//therefore we use the internal function of fusion!
@@ -63,10 +63,9 @@
template<typename T>
struct result;
- template <typename T, typename CountT>
- struct result<count_ints(T,CountT)>
+ template <typename Self,typename T, typename CountT>
+ struct result<Self(T,CountT)>
{
- //TODO !!!
typedef typename boost::fusion::detail::identity<T>::type elem;
typedef typename boost::fusion::detail::identity<CountT>::type state;
//typedef typename boost::remove_const<
@@ -107,10 +106,9 @@
template<typename Sig>
struct result;
- template<typename T0, typename T1>
- struct result<lvalue_adder(T0&, T1)>
+ template<typename Self,typename T0, typename T1>
+ struct result<Self(T0&, T1)>
{
- // Second argument still needs to support rvalues - see definition of fusion::fold
typedef T0 type;
};
Modified: sandbox/SOC/2009/fusion/libs/fusion/test/algorithm/transform.cpp
==============================================================================
--- sandbox/SOC/2009/fusion/libs/fusion/test/algorithm/transform.cpp (original)
+++ sandbox/SOC/2009/fusion/libs/fusion/test/algorithm/transform.cpp 2009-07-18 17:08:50 EDT (Sat, 18 Jul 2009)
@@ -19,14 +19,7 @@
struct square
{
- template<typename Sig>
- struct result;
-
- template <typename T>
- struct result<square(T)>
- {
- typedef int type;
- };
+ typedef int result_type;
template <typename T>
int operator()(T x) const
@@ -37,14 +30,7 @@
struct add
{
- template<typename Sig>
- struct result;
-
- template <typename A, typename B>
- struct result<add(A, B)>
- {
- typedef int type;
- };
+ typedef int result_type;
template <typename A, typename B>
int operator()(A a, B b) const
@@ -58,8 +44,8 @@
template<typename Sig>
struct result;
- template<typename T>
- struct result<unary_lvalue_transform(T&)>
+ template<typename Self,typename T>
+ struct result<Self(T&)>
{
typedef T* type;
};
@@ -81,8 +67,8 @@
template<typename Sig>
struct result;
- template<typename T0, typename T1>
- struct result<binary_lvalue_transform(T0&,T1&)>
+ template<typename Self,typename T0, typename T1>
+ struct result<Self(T0&,T1&)>
{
typedef T0* type;
};
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 17:08:50 EDT (Sat, 18 Jul 2009)
@@ -165,7 +165,7 @@
fusion::single_view<members const&> sv_ref_c_ctx( that);
fusion::single_view<members const *> sv_ptr_c_ctx(& that);
fusion::single_view<std::auto_ptr<members> const&> sv_spt_ctx(spt_that);
-fusion::single_view< std::auto_ptr<members const> const&> sv_spt_c_ctx(spt_that_c);
+fusion::single_view<std::auto_ptr<members const> const&> sv_spt_c_ctx(spt_that_c);
derived derived_that;
Modified: sandbox/SOC/2009/fusion/libs/fusion/test/functional/make_unfused.cpp
==============================================================================
--- sandbox/SOC/2009/fusion/libs/fusion/test/functional/make_unfused.cpp (original)
+++ sandbox/SOC/2009/fusion/libs/fusion/test/functional/make_unfused.cpp 2009-07-18 17:08:50 EDT (Sat, 18 Jul 2009)
@@ -41,7 +41,7 @@
struct result;
template <class Self, class Seq>
- struct result< Self(Seq &) >
+ struct result< Self(Seq) >
: mpl::if_< mpl::and_< fusion::result_of::empty<Seq>, RemoveNullary >,
boost::blank, mpl::identity<long> >::type
{ };
Modified: sandbox/SOC/2009/fusion/libs/fusion/test/sequence/transform_view.cpp
==============================================================================
--- sandbox/SOC/2009/fusion/libs/fusion/test/sequence/transform_view.cpp (original)
+++ sandbox/SOC/2009/fusion/libs/fusion/test/sequence/transform_view.cpp 2009-07-18 17:08:50 EDT (Sat, 18 Jul 2009)
@@ -26,14 +26,7 @@
struct square
{
- template<typename T>
- struct result;
-
- template <typename T>
- struct result<square(T)>
- {
- typedef int type;
- };
+ typedef int result_type;
template <typename T>
int operator()(T x) const
@@ -44,14 +37,7 @@
struct add
{
- template<typename T>
- struct result;
-
- template <typename A, typename B>
- struct result<add(A,B)>
- {
- typedef int type;
- };
+ typedef int result_type;
template <typename A, typename B>
int operator()(A a, B b) const
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 17:08:50 EDT (Sat, 18 Jul 2009)
@@ -25,5 +25,5 @@
#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