Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r66709 - in sandbox/SOC/2010/phoenix3: boost/phoenix boost/phoenix/bind boost/phoenix/core boost/phoenix/core/detail boost/phoenix/function libs/phoenix/test libs/phoenix/test/boost_bind_compatibility
From: thom.heller_at_[hidden]
Date: 2010-11-24 10:14:18


Author: theller
Date: 2010-11-24 10:14:13 EST (Wed, 24 Nov 2010)
New Revision: 66709
URL: http://svn.boost.org/trac/boost/changeset/66709

Log:
fixed bind compatibility tests
Text files modified:
   sandbox/SOC/2010/phoenix3/boost/phoenix/bind/bind.hpp | 53 ++++++
   sandbox/SOC/2010/phoenix3/boost/phoenix/core.hpp | 2
   sandbox/SOC/2010/phoenix3/boost/phoenix/core/actor.hpp | 282 ---------------------------------------
   sandbox/SOC/2010/phoenix3/boost/phoenix/core/argument.hpp | 83 ----------
   sandbox/SOC/2010/phoenix3/boost/phoenix/core/detail/actor_operator.hpp | 44 +++++
   sandbox/SOC/2010/phoenix3/boost/phoenix/core/expression.hpp | 7
   sandbox/SOC/2010/phoenix3/boost/phoenix/core/function_equal.hpp | 105 ++++++++++++++
   sandbox/SOC/2010/phoenix3/boost/phoenix/core/reference.hpp | 57 -------
   sandbox/SOC/2010/phoenix3/boost/phoenix/core/terminal.hpp | 4
   sandbox/SOC/2010/phoenix3/boost/phoenix/core/value.hpp | 12
   sandbox/SOC/2010/phoenix3/boost/phoenix/function/function.hpp | 13 +
   sandbox/SOC/2010/phoenix3/libs/phoenix/test/Jamfile | 98 ++++++------
   sandbox/SOC/2010/phoenix3/libs/phoenix/test/boost_bind_compatibility/bind_cdecl_mf_test.cpp | 54 +++---
   sandbox/SOC/2010/phoenix3/libs/phoenix/test/boost_bind_compatibility/bind_const_test.cpp | 2
   sandbox/SOC/2010/phoenix3/libs/phoenix/test/boost_bind_compatibility/bind_cv_test.cpp | 7
   sandbox/SOC/2010/phoenix3/libs/phoenix/test/boost_bind_compatibility/bind_eq_test.cpp | 93 ++++++------
   sandbox/SOC/2010/phoenix3/libs/phoenix/test/boost_bind_compatibility/bind_fn2_test.cpp | 2
   sandbox/SOC/2010/phoenix3/libs/phoenix/test/boost_bind_compatibility/bind_function_test.cpp | 12
   sandbox/SOC/2010/phoenix3/libs/phoenix/test/boost_bind_compatibility/bind_mf2_test.cpp | 2
   sandbox/SOC/2010/phoenix3/libs/phoenix/test/boost_bind_compatibility/bind_not_test.cpp | 15 -
   sandbox/SOC/2010/phoenix3/libs/phoenix/test/boost_bind_compatibility/bind_placeholder_test.cpp | 24 +-
   sandbox/SOC/2010/phoenix3/libs/phoenix/test/boost_bind_compatibility/bind_rel_test.cpp | 1
   sandbox/SOC/2010/phoenix3/libs/phoenix/test/boost_bind_compatibility/bind_rv_sp_test.cpp | 2
   sandbox/SOC/2010/phoenix3/libs/phoenix/test/boost_bind_compatibility/bind_rvalue_test.cpp | 2
   sandbox/SOC/2010/phoenix3/libs/phoenix/test/boost_bind_compatibility/bind_stateful_test.cpp | 38 +---
   sandbox/SOC/2010/phoenix3/libs/phoenix/test/boost_bind_compatibility/bind_test.cpp | 2
   sandbox/SOC/2010/phoenix3/libs/phoenix/test/boost_bind_compatibility/bind_visit_test.cpp | 6
   27 files changed, 417 insertions(+), 605 deletions(-)

Modified: sandbox/SOC/2010/phoenix3/boost/phoenix/bind/bind.hpp
==============================================================================
--- sandbox/SOC/2010/phoenix3/boost/phoenix/bind/bind.hpp (original)
+++ sandbox/SOC/2010/phoenix3/boost/phoenix/bind/bind.hpp 2010-11-24 10:14:13 EST (Wed, 24 Nov 2010)
@@ -11,22 +11,63 @@
 #ifndef PHOENIX_BIND_BIND_HPP
 #define PHOENIX_BIND_BIND_HPP
 
-#include <boost/phoenix/function/function.hpp>
+//#include <boost/phoenix/core/expression.hpp>
+//#include <boost/phoenix/core/unpack.hpp>
+#include <boost/phoenix/function.hpp>
 #include <boost/phoenix/support/iterate.hpp>
 #include <boost/utility/result_of.hpp>
 
 namespace boost { namespace phoenix
 {
-
     ////////////////////////////////////////////////////////////////////////////
     // Bind
     ////////////////////////////////////////////////////////////////////////////
+
+#if 0
+ PHOENIX_DEFINE_EXPRESSION_VARARG(bind, (meta_grammar), PHOENIX_ARG_LIMIT)
+
+ struct bind_eval
+ : proto::callable
+ {
+ template <typename Sig>
+ struct result;
+
+ template <typename This, typename Env, typename F>
+ struct result<This(Env &, F const &)>
+ /*: boost::result_of<
+ typename boost::result_of<evaluator(F const &, Env &)>::type()
+ >*/
+ {
+ typedef int type;
+ };
+ typedef int result_type;
+
+ template <typename Env, typename F>
+ result_type//typename result<bind_eval(Env &, F const &)>::type
+ operator()(Env & env, F const & f) const
+ {
+ eval(f, env);
+ std::cout << typeid(detail::wrap<typename boost::result_of<evaluator(F const&, Env&)>::type>).name() << "\n";
+ //std::cout << typeid(detail::wrap<typename boost::result_of<evaluator(F &, Env&)>::type>).name() << "\n";
+ //std::cout << typeid(detail::wrap<typename proto::result_of::value<F>::type>).name() << "\n";
+ //std::cout << typeid(detail::wrap<typename proto::result_of::value<F const &>::type>).name() << "\n";
+ //std::cout << typeid(detail::wrap<typename proto::result_of::value<F &>::type>).name() << "\n";
+ return 5;//typename result<bind_eval(Env &, F const &)>::type();
+ }
+ };
+
+ template <typename Dummy>
+ struct default_actions::when<rule::bind, Dummy>
+ : proto::call<bind_eval(_env, unpack)>
+ {};
+#endif
     
     template <typename F>
- //typename boost::result_of<function<F>()>::type const
- typename result_of::function<F>::type const
+ typename boost::result_of<function<F>()>::type const
+ //typename expression::bind<F>::type
     bind(F f)
     {
+ //return expression::bind<F>::make(f);
         return function<F>(f)();
     }
 
@@ -49,9 +90,9 @@
>::type
 #else*/
     //typename boost::result_of<function<F>(PHOENIX_A_const_ref)>::type const
- typename result_of::function<F, PHOENIX_A_const_ref>::type const
+ typename result_of::function<F, PHOENIX_A>::type const
 //#endif
- bind(F f, PHOENIX_A_const_ref_a)
+ bind(F f, PHOENIX_A_a)
     {
         return function<F>(f)(PHOENIX_a);
     }

Modified: sandbox/SOC/2010/phoenix3/boost/phoenix/core.hpp
==============================================================================
--- sandbox/SOC/2010/phoenix3/boost/phoenix/core.hpp (original)
+++ sandbox/SOC/2010/phoenix3/boost/phoenix/core.hpp 2010-11-24 10:14:13 EST (Wed, 24 Nov 2010)
@@ -16,7 +16,7 @@
 #include <boost/phoenix/core/value.hpp>
 #include <boost/phoenix/core/reference.hpp>
 //#include <boost/phoenix/core/nothing.hpp>
-//#include <boost/phoenix/core/function_equal.hpp>
+#include <boost/phoenix/core/function_equal.hpp>
 //#include <boost/phoenix/core/visit_each.hpp>
 
 #endif

Modified: sandbox/SOC/2010/phoenix3/boost/phoenix/core/actor.hpp
==============================================================================
--- sandbox/SOC/2010/phoenix3/boost/phoenix/core/actor.hpp (original)
+++ sandbox/SOC/2010/phoenix3/boost/phoenix/core/actor.hpp 2010-11-24 10:14:13 EST (Wed, 24 Nov 2010)
@@ -94,11 +94,6 @@
         // Bring in the rest
         #include <boost/phoenix/core/detail/actor_result_of.hpp>
     }
-
- /*
- template <PHOENIX_typename_A_void(PHOENIX_COMPOSITE_LIMIT), typename Dummy = void>
- struct actor_fun_eval;
- */
 
     ////////////////////////////////////////////////////////////////////////////
     //
@@ -125,10 +120,10 @@
             : result_of::actor<Expr>
         {};
         */
- BOOST_MPL_ASSERT((proto::matches<actor<Expr>, meta_grammar>));
+ //BOOST_MPL_ASSERT((proto::matches<actor<Expr>, meta_grammar>));
 
         typename result_of::actor<Expr>::type
- operator()() const
+ operator()()
         {
             typedef make_basic_environment<default_actions> env_type;
             typename env_type::type env = env_type::make();
@@ -136,282 +131,19 @@
             return eval(*this, env);
         }
 
- template <typename This, typename A0>
- struct result<This(A0)>
- : result_of::actor<Expr, A0>
- {};
-
- template <typename A0>
- typename result_of::actor<Expr, A0&>::type
- operator()(A0& a0) const
- {
- typedef make_basic_environment<default_actions, A0&> env_type;
- typename env_type::type env = env_type::make(a0);
-
- return eval(*this, env);
- }
-
- template <typename A0>
- typename result_of::actor<Expr, A0 const&>::type
- operator()(A0 const& a0) const
- {
- typedef make_basic_environment<default_actions, A0 const&> env_type;
- typename env_type::type env = env_type::make(a0);
-
- return eval(*this, env);
- }
-
- /*
- template <typename A0>
- typename compose<actor_fun_eval<actor<Expr>, actor<A0> >, actor<Expr>, actor<A0> >::type const
- operator()(actor<A0> const& a0) const
- {
- return compose<actor_fun_eval<actor<Expr>, actor<A0> >, actor<Expr>, actor<A0> >()(*this, a0);
- }
- */
-
- template <typename This, typename A0, typename A1>
- struct result<This(A0&, A1&)>
- : result_of::actor<Expr, A0, A1>
- {};
-
- template <typename A0, typename A1>
- typename result_of::actor<Expr, A0&, A1&>::type
- operator()(A0& a0, A1& a1) const
- {
- typedef make_basic_environment<default_actions, A0&, A1&> env_type;
- typename env_type::type env = env_type::make(a0, a1);
-
- return eval(*this, env);
- }
-
- template <typename A0, typename A1>
- typename result_of::actor<Expr, A0&, A1 const&>::type
- operator()(A0& a0, A1 const& a1) const
- {
- typedef make_basic_environment<default_actions, A0&, A1 const&> env_type;
- typename env_type::type env = env_type::make(a0, a1);
-
- return eval(*this, env);
- }
-
- template <typename A0, typename A1>
- typename result_of::actor<Expr, A0 const&, A1&>::type
- operator()(A0 const& a0, A1& a1) const
- {
- typedef make_basic_environment<default_actions, A0 const&, A1 &> env_type;
- typename env_type::type env = env_type::make(a0, a1);
-
- return eval(*this, env);
- }
-
- template <typename A0, typename A1>
- typename result_of::actor<Expr, A0 const&, A1 const&>::type
- operator()(A0 const& a0, A1 const& a1) const
- {
- typedef make_basic_environment<default_actions, A0 const&, A1 const&> env_type;
- typename env_type::type env = env_type::make(a0, a1);
-
- return eval(this->proto_base(), env);
- }
-
- /*
- template <typename A0, typename A1>
- typename compose<
- actor_fun_eval<
- actor<Expr>, actor<A0>, actor<A1>
- >
- , actor<Expr>, actor<A0>, actor<A1>
- >::type const
- operator()(actor<A0> const& a0, actor<A1> const& a1) const
- {
- return compose<
- actor_fun_eval<actor<Expr>, actor<A0>, actor<A1> >
- , actor<Expr>, actor<A0>, actor<A1>
- >()(*this, a0, a1);
- }
- */
-
- template <typename This, typename A0, typename A1, typename A2>
- struct result<This(A0, A1, A2)>
- : result_of::actor<Expr, A0, A1, A2>
- {};
-
- template <typename A0, typename A1, typename A2>
- typename result_of::actor<Expr, A0&, A1&, A2&>::type
- operator()(A0& a0, A1& a1, A2& a2) const
- {
- typedef make_basic_environment<default_actions, A0&, A1&, A2&> env_type;
- typename env_type::type env = env_type::make(a0, a1, a2);
-
- return eval(*this, env);
- }
-
- template <typename A0, typename A1, typename A2>
- typename result_of::actor<Expr, A0 const&, A1&, A2&>::type
- operator()(A0 const& a0, A1& a1, A2& a2) const
- {
- typedef make_basic_environment<default_actions, A0 const&, A1&, A2&> env_type;
- typename env_type::type env = env_type::make(a0, a1, a2);
-
- return eval(*this, env);
- }
-
- template <typename A0, typename A1, typename A2>
- typename result_of::actor<Expr, A0&, A1 const&, A2&>::type
- operator()(A0& a0, A1 const& a1, A2& a2) const
- {
- typedef make_basic_environment<default_actions, A0&, A1 const&, A2&> env_type;
- typename env_type::type env = env_type::make(a0, a1, a2);
-
- return eval(*this, env);
- }
-
- template <typename A0, typename A1, typename A2>
- typename result_of::actor<Expr, A0&, A1&, A2 const&>::type
- operator()(A0& a0, A1& a1, A2 const& a2) const
- {
- typedef make_basic_environment<default_actions, A0&, A1&, A2 const&> env_type;
- typename env_type::type env = env_type::make(a0, a1, a2);
-
- return eval(*this, env);
- }
-
- template <typename A0, typename A1, typename A2>
- typename result_of::actor<Expr, A0 const&, A1 const&, A2&>::type
- operator()(A0 const& a0, A1 const& a1, A2& a2) const
- {
- typedef make_basic_environment<default_actions, A0 const&, A1 const&, A2&> env_type;
- typename env_type::type env = env_type::make(a0, a1, a2);
-
- return eval(*this, env);
- }
-
- template <typename A0, typename A1, typename A2>
- typename result_of::actor<Expr, A0&, A1 const&, A2 const&>::type
- operator()(A0& a0, A1 const& a1, A2 const& a2) const
- {
- typedef make_basic_environment<default_actions, A0&, A1 const&, A2 const&> env_type;
- typename env_type::type env = env_type::make(a0, a1, a2);
-
- return eval(*this, env);
- }
-
- template <typename A0, typename A1, typename A2>
- typename result_of::actor<Expr, A0 const&, A1&, A2 const&>::type
- operator()(A0 const& a0, A1& a1, A2 const& a2) const
- {
- typedef make_basic_environment<default_actions, A0 const&, A1&, A2 const&> env_type;
- typename env_type::type env = env_type::make(a0, a1, a2);
-
- return eval(*this, env);
- }
-
- template <typename A0, typename A1, typename A2>
- typename result_of::actor<Expr, A0 const&, A1 const&, A2 const&>::type
- operator()(A0 const& a0, A1 const& a1, A2 const& a2) const
+ typename result_of::actor<Expr>::type
+ operator()() const
         {
- typedef make_basic_environment<default_actions, A0 const&, A1 const&, A2 const&> env_type;
- typename env_type::type env = env_type::make(a0, a1, a2);
+ typedef make_basic_environment<default_actions> env_type;
+ typename env_type::type env = env_type::make();
 
             return eval(*this, env);
         }
-
- /*
- template <typename A0, typename A1, typename A2>
- typename compose<
- actor_fun_eval<
- actor<Expr>, actor<A0>, actor<A1>, actor<A2>
- >
- , actor<Expr>, actor<A0>, actor<A1>, actor<A2>
- >::type const
- operator()(actor<A0> const& a0, actor<A1> const& a1, actor<A2> const& a2) const
- {
- return compose<
- actor_fun_eval<actor<Expr>, actor<A0>, actor<A1>, actor<A2> >
- , actor<Expr>, actor<A0>, actor<A1>, actor<A2>
- >()(*this, a0, a1, a2);
- }
- */
-
+
         // Bring in the rest
         #include <boost/phoenix/core/detail/actor_operator.hpp>
     };
 
- /*
- template <typename A0, typename A1>
- struct actor_fun_eval<A0, A1>
- {
- template <typename Env>
- struct basic_environment
- : make_basic_environment<
- typename boost::result_of<eval_grammar(A1 const&, Env&)>::type
- >
- {};
-
- template <typename Sig>
- struct result;
-
- template <typename This, typename Env>
- struct result<This(Env&, A0 const&, A1 const&)>
- {
- typedef typename boost::result_of<
- eval_grammar(A0 const&, typename basic_environment<Env>::type&)
- >::type
- type;
- };
-
- template <typename Env>
- typename boost::result_of<
- eval_grammar(A0 const&, typename basic_environment<Env>::type&)
- >::type
- operator()(Env& env, A0 const& a0, A1 const& a1) const
- {
- typename basic_environment<Env>::type args(eval(a1, env));
-
- return eval(a0, args);
- }
- };
-
- template <typename A0, typename A1, typename A2>
- struct actor_fun_eval<A0, A1, A2>
- {
- template <typename Env>
- struct basic_environment
- : make_basic_environment<
- typename boost::result_of<eval_grammar(A1 const&, Env&)>::type
- , typename boost::result_of<eval_grammar(A2 const&, Env&)>::type
- >
- {};
-
- template <typename Sig>
- struct result;
-
- template <typename This, typename Env>
- struct result<This(Env&, A0 const&, A1 const&, A2 const&)>
- {
- typedef typename boost::result_of<
- eval_grammar(A0 const&, typename basic_environment<Env>::type&)
- >::type
- type;
- };
-
- template <typename Env>
- typename boost::result_of<
- eval_grammar(A0 const&, typename basic_environment<Env>::type&)
- >::type
- operator()(Env& env, A0 const& a0, A1 const& a1, A2 const& a2) const
- {
- typename basic_environment<Env>::type args(eval(a1, env), eval(a2, env));
-
- return eval(a0, args);
- }
- };
-
- // Bring in the rest ...
- #include <boost/phoenix/core/detail/actor_fun_eval.hpp>
- */
-
 }}
 
 namespace boost

Modified: sandbox/SOC/2010/phoenix3/boost/phoenix/core/argument.hpp
==============================================================================
--- sandbox/SOC/2010/phoenix3/boost/phoenix/core/argument.hpp (original)
+++ sandbox/SOC/2010/phoenix3/boost/phoenix/core/argument.hpp 2010-11-24 10:14:13 EST (Wed, 24 Nov 2010)
@@ -42,6 +42,12 @@
         typedef I type;
         typedef typename I::value_type value_type;
         static value_type const value = I::value;
+
+ template <typename I2>
+ bool operator==(argument<I2> const&) const
+ {
+ return value == I2::value;
+ }
     };
 
 }}
@@ -57,7 +63,7 @@
 {
     #define BOOST_PHOENIX_ARGUMENT_N(_, N, name) \
     actor< \
- proto::terminal<argument<mpl::int_<N> > >::type const \
+ proto::terminal<argument<mpl::int_<N> > >::type \
> const BOOST_PP_CAT(name, BOOST_PP_INC(N)) = {};
 
     namespace placeholders
@@ -71,81 +77,6 @@
         BOOST_PP_REPEAT(PHOENIX_ARG_LIMIT, BOOST_PHOENIX_ARGUMENT_N, arg)
         BOOST_PP_REPEAT(PHOENIX_ARG_LIMIT, BOOST_PHOENIX_ARGUMENT_N, _)
     }
-
-/*
- namespace result_of
- {
- template <typename Env, typename N>
- struct argument
- : result_of::get_environment_argument<
- Env, typename boost::result_of<eval_grammar(N)>::type>
- {};
- }
-
- struct argument
- {
- template <typename Sig>
- struct result;
-
- template <typename This, typename Env, typename N>
- struct result<This(Env&, N const&)>
- : result_of::argument<Env, N>
- {};
-
- template <typename Env, typename N>
- typename result_of::argument<Env, N>::type
- operator()(Env& env, N const&) const
- {
- typedef typename boost::result_of<eval_grammar(N)>::type argument_id;
- return get_environment_argument_c<argument_id::value>(env);
- }
- };
-
- template <typename Dummy>
- struct enable_nullary<argument, Dummy>
- : mpl::false_
- {};
-
-
- template <typename N>
- struct make_argument : boost::phoenix::compose<argument, N> {};
-
- namespace placeholders
- {
- // Phoenix style names
- make_argument<mpl::int_<0> >::type const arg1 = {};
- make_argument<mpl::int_<1> >::type const arg2 = {};
- make_argument<mpl::int_<2> >::type const arg3 = {};
- make_argument<mpl::int_<3> >::type const arg4 = {};
- make_argument<mpl::int_<4> >::type const arg5 = {};
-
- // BLL style names
- make_argument<mpl::int_<0> >::type const _1 = {};
- make_argument<mpl::int_<1> >::type const _2 = {};
- make_argument<mpl::int_<2> >::type const _3 = {};
- make_argument<mpl::int_<3> >::type const _4 = {};
- make_argument<mpl::int_<4> >::type const _5 = {};
- make_argument<mpl::int_<5> >::type const _6 = {};
- make_argument<mpl::int_<6> >::type const _7 = {};
- make_argument<mpl::int_<7> >::type const _8 = {};
- make_argument<mpl::int_<8> >::type const _9 = {};
- }
-
- namespace arg_names
- {
- // bring in names for backwards compatibility
-
- using placeholders::arg1;
- using placeholders::arg2;
- using placeholders::arg3;
- using placeholders::arg4;
- using placeholders::arg5;
-
- using placeholders::_1;
- using placeholders::_2;
- using placeholders::_3;
- }
-*/
 }}
 
 #endif

Modified: sandbox/SOC/2010/phoenix3/boost/phoenix/core/detail/actor_operator.hpp
==============================================================================
--- sandbox/SOC/2010/phoenix3/boost/phoenix/core/detail/actor_operator.hpp (original)
+++ sandbox/SOC/2010/phoenix3/boost/phoenix/core/detail/actor_operator.hpp 2010-11-24 10:14:13 EST (Wed, 24 Nov 2010)
@@ -14,7 +14,7 @@
 #include <boost/phoenix/support/iterate.hpp>
 
 #define PHOENIX_ITERATION_PARAMS \
- (3, (4, PHOENIX_ACTOR_LIMIT, \
+ (3, (1, PHOENIX_ACTOR_LIMIT, \
         <boost/phoenix/core/detail/actor_operator.hpp>))
 #include PHOENIX_ITERATE()
 
@@ -33,6 +33,16 @@
 
         template <PHOENIX_typename_A>
         typename result_of::actor<Expr, PHOENIX_A_ref>::type
+ operator()(PHOENIX_A_ref_a)
+ {
+ typedef make_basic_environment<default_actions, PHOENIX_A_ref> env_type;
+ typename env_type::type env = env_type::make(PHOENIX_a);
+
+ return eval(*this, env);
+ }
+
+ template <PHOENIX_typename_A>
+ typename result_of::actor<Expr, PHOENIX_A_ref>::type
         operator()(PHOENIX_A_ref_a) const
         {
             typedef make_basic_environment<default_actions, PHOENIX_A_ref> env_type;
@@ -43,6 +53,16 @@
 
         template <PHOENIX_typename_A>
         typename result_of::actor<Expr, PHOENIX_A_const_ref>::type
+ operator()(PHOENIX_A_const_ref_a)
+ {
+ typedef make_basic_environment<default_actions, PHOENIX_A_const_ref> env_type;
+ typename env_type::type env = env_type::make(PHOENIX_a);
+
+ return eval(*this, env);
+ }
+
+ template <PHOENIX_typename_A>
+ typename result_of::actor<Expr, PHOENIX_A_const_ref>::type
         operator()(PHOENIX_A_const_ref_a) const
         {
             typedef make_basic_environment<default_actions, PHOENIX_A_const_ref> env_type;
@@ -66,10 +86,24 @@
         operator()(PHOENIX_PERM_A_a(I)) const \
         { \
             typedef \
- make_basic_environment< \
- default_actions, PHOENIX_PERM_A(I) \
- > \
- env_type; \
+ make_basic_environment< \
+ default_actions, PHOENIX_PERM_A(I) \
+ > \
+ env_type; \
+ typename env_type::type env = env_type::make(PHOENIX_a); \
+ \
+ return eval(*this, env); \
+ } \
+ \
+ template <PHOENIX_typename_A> \
+ typename result_of::actor<Expr, PHOENIX_PERM_A(I)>::type \
+ operator()(PHOENIX_PERM_A_a(I)) \
+ { \
+ typedef \
+ make_basic_environment< \
+ default_actions, PHOENIX_PERM_A(I) \
+ > \
+ env_type; \
             typename env_type::type env = env_type::make(PHOENIX_a); \
                                                                                 \
             return eval(*this, env); \

Modified: sandbox/SOC/2010/phoenix3/boost/phoenix/core/expression.hpp
==============================================================================
--- sandbox/SOC/2010/phoenix3/boost/phoenix/core/expression.hpp (original)
+++ sandbox/SOC/2010/phoenix3/boost/phoenix/core/expression.hpp 2010-11-24 10:14:13 EST (Wed, 24 Nov 2010)
@@ -215,13 +215,12 @@
         : proto::transform<expr_ext<Actor, Tag, PHOENIX_A>, int>
     {
         typedef typename proto::result_of::make_expr<Tag, default_domain_with_basic_expr, PHOENIX_A>::type base_type;
- typedef Actor<base_type const> type;
+ typedef Actor<base_type> type;
         typedef typename proto::nary_expr<Tag, PHOENIX_A>::proto_grammar proto_grammar;
         
- static type const make(PHOENIX_A_a)
+ static type make(PHOENIX_A_a)
         {
- base_type const b = proto::make_expr<Tag, default_domain_with_basic_expr>(PHOENIX_a);
- type const e = {b};
+ type e = {proto::make_expr<Tag, default_domain_with_basic_expr>(PHOENIX_a)};
             return e;
         }
 

Modified: sandbox/SOC/2010/phoenix3/boost/phoenix/core/function_equal.hpp
==============================================================================
--- sandbox/SOC/2010/phoenix3/boost/phoenix/core/function_equal.hpp (original)
+++ sandbox/SOC/2010/phoenix3/boost/phoenix/core/function_equal.hpp 2010-11-24 10:14:13 EST (Wed, 24 Nov 2010)
@@ -8,13 +8,112 @@
 #ifndef PHOENIX_CORE_FUNCTION_EQUAL_HPP
 #define PHOENIX_CORE_FUNCTION_EQUAL_HPP
 
+#include <boost/phoenix/core/terminal.hpp>
+
+namespace boost
+{
+ template <typename> class weak_ptr;
+}
+
 namespace boost { namespace phoenix
 {
- // FIXME: need some binary visitation to compare runtime information, needed for bind tests
+ namespace detail
+ {
+ struct compare
+ : proto::callable
+ {
+ typedef bool result_type;
+
+ template <typename A0, typename A1>
+ result_type operator()(A0 const & a0, A1 const & a1) const
+ {
+ return a0 == a1;
+ }
+
+ // hard wiring reference_wrapper and weak_ptr here ...
+ // **TODO** find out why boost bind does this ...
+ template <typename A0, typename A1>
+ result_type operator()(reference_wrapper<A0> const & a0, reference_wrapper<A1> const & a1) const
+ {
+ return a0.get_pointer() == a1.get_pointer();
+ }
+ template <typename A0, typename A1>
+ result_type operator()(weak_ptr<A0> const & a0, weak_ptr<A1> const & a1) const
+ {
+ return !(a0 < a1) && !(a1 < a0);
+ }
+ };
+
+ struct test;
+
+ struct function_equal_
+ : proto::when<
+ proto::if_<
+ proto::matches<proto::_, proto::_state>()
+ , proto::or_<
+ /*proto::when<
+ rule::custom_terminal
+ , compare(proto::_value, proto::_value(proto::_state))
+ >
+ ,*/ proto::when<
+ proto::terminal<proto::_>
+ , proto::if_<
+ mpl::false_()//is_custom_terminal<proto::_value>()
+ , compare(
+ proto::lazy<custom_terminal<proto::_value>(proto::_value)>
+ , proto::lazy<custom_terminal<proto::_value(proto::_state)>(proto::_value(proto::_state))>
+ )
+ , compare(proto::_value, proto::_value(proto::_state))
+ >
+ >
+ , proto::otherwise<test(proto::_, proto::_state)>
+ >
+ , test()
+ >
+ >
+ {};
+
+ struct test
+ : proto::callable
+ {
+ typedef bool result_type;
+
+ result_type operator()() const
+ {
+ return false;
+ }
+
+ template <typename Expr1>
+ result_type operator()(Expr1 const& e1, Expr1 const& e2) const
+ {
+ return eval(e1, e2, typename proto::arity_of<Expr1>::type());
+ }
+
+ private:
+ #define FUNCTION_EQUAL_R(Z, N, DATA) \
+ BOOST_PP_IF(N, &&, BOOST_PP_EMPTY()) \
+ function_equal_()( \
+ proto::child_c< N >(e1) \
+ , proto::child_c< N >(e2) \
+ ) \
+ /**/
+
+ #define FUNCTION_EQUAL(Z, N, DATA) \
+ template <typename Expr1> \
+ result_type eval(Expr1 const& e1, Expr1 const& e2, mpl::long_< N >) const \
+ { \
+ return BOOST_PP_REPEAT(N, FUNCTION_EQUAL_R, _); \
+ } \
+ /**/
+
+ BOOST_PP_REPEAT(BOOST_PROTO_MAX_ARITY, FUNCTION_EQUAL, _)
+ };
+ }
+
     template <typename Expr1, typename Expr2>
- bool function_equal_impl(actor<Expr1> const&, actor<Expr2> const&)
+ bool function_equal_impl(actor<Expr1> const& a1, actor<Expr2> const& a2)
     {
- return true;//typeid(actor<Expr1>) == typeid(actor<Expr2>);
+ return detail::function_equal_()(a1, a2);
     }
 
     template <typename Expr1, typename Expr2>

Modified: sandbox/SOC/2010/phoenix3/boost/phoenix/core/reference.hpp
==============================================================================
--- sandbox/SOC/2010/phoenix3/boost/phoenix/core/reference.hpp (original)
+++ sandbox/SOC/2010/phoenix3/boost/phoenix/core/reference.hpp 2010-11-24 10:14:13 EST (Wed, 24 Nov 2010)
@@ -26,7 +26,7 @@
     struct reference
         : proto::terminal<reference_wrapper<T> >
     {
- typedef actor<typename proto::terminal<reference_wrapper<T> >::type const> type;
+ typedef actor<typename proto::terminal<reference_wrapper<T> >::type> type;
     };
 
     template <typename T>
@@ -57,63 +57,18 @@
     {
         typedef T &result_type;
 
- template <typename Env>
- T &operator()(boost::reference_wrapper<T> r, Env &) const
+ T &operator()(boost::reference_wrapper<T> r) const
         {
+ std::cout << "...\n";
             return r;
         }
- };
- /*
- namespace result_of
- {
- template <typename Env, typename T>
- struct reference;
-
- template <typename Env, typename T>
- struct reference<Env, T const&>
- : boost::result_of<eval_grammar(T const&)>
- {};
- }
-
- struct reference
- {
- template <typename Sig>
- struct result;
 
- template <typename This, typename Env, typename T>
- struct result<This(Env&, T const&)>
- : result_of::reference<Env, T const&>
- {};
-
- template <typename Env, typename T>
- typename result_of::reference<Env, T const&>::type
- operator()(Env& env, T const& ref) const
+ template <typename Env>
+ T &operator()(boost::reference_wrapper<T> r, Env &) const
         {
- return eval(ref);
+ return r;
         }
     };
-
- template <typename T>
- struct make_reference : compose<reference, T&> {};
-
- template <typename T>
- struct make_reference<T const> : compose<reference, T const&> {};
-
- template <typename T>
- typename make_reference<T>::type const
- ref(T& t)
- {
- return make_reference<T>()(t);
- }
-
- template <typename T>
- typename make_reference<T const>::type const
- cref(T const& t)
- {
- return make_reference<T const>()(t);
- }
- */
-
 }}
 
 #endif

Modified: sandbox/SOC/2010/phoenix3/boost/phoenix/core/terminal.hpp
==============================================================================
--- sandbox/SOC/2010/phoenix3/boost/phoenix/core/terminal.hpp (original)
+++ sandbox/SOC/2010/phoenix3/boost/phoenix/core/terminal.hpp 2010-11-24 10:14:13 EST (Wed, 24 Nov 2010)
@@ -8,6 +8,9 @@
 #ifndef PHOENIX_CORE_TERMINAL_HPP
 #define PHOENIX_CORE_TERMINAL_HPP
 
+#include <boost/is_placeholder.hpp>
+
+/*
 namespace boost
 {
     template <typename T>
@@ -15,6 +18,7 @@
         : mpl::false_
     {};
 }
+*/
 
 namespace boost { namespace phoenix
 {

Modified: sandbox/SOC/2010/phoenix3/boost/phoenix/core/value.hpp
==============================================================================
--- sandbox/SOC/2010/phoenix3/boost/phoenix/core/value.hpp (original)
+++ sandbox/SOC/2010/phoenix3/boost/phoenix/core/value.hpp 2010-11-24 10:14:13 EST (Wed, 24 Nov 2010)
@@ -26,26 +26,26 @@
     struct value
         : proto::terminal<T>
     {
- typedef actor<typename proto::terminal<T>::type const> type;
+ typedef actor<typename proto::terminal<T>::type> type;
     };
     
     template <typename T, int N>
     struct value<T[N]>
         : proto::terminal<T>
     {
- typedef actor<typename proto::terminal<T const* >::type const> type;
+ typedef actor<typename proto::terminal<T* >::type> type;
     };
-
+
     template <typename T>
- typename value<T>::type const
+ typename value<T const>::type
     val(T const & t)
     {
- typename value<T>::type const e = {{t}};
+ typename value<T const>::type const e = {{t}};
         return e;
     }
 
     template <typename T>
- typename value<T>::type const
+ typename value<T>::type
     val(T & t)
     {
         typename value<T>::type const e = {{t}};

Modified: sandbox/SOC/2010/phoenix3/boost/phoenix/function/function.hpp
==============================================================================
--- sandbox/SOC/2010/phoenix3/boost/phoenix/function/function.hpp (original)
+++ sandbox/SOC/2010/phoenix3/boost/phoenix/function/function.hpp 2010-11-24 10:14:13 EST (Wed, 24 Nov 2010)
@@ -22,6 +22,19 @@
     // Functions
     ////////////////////////////////////////////////////////////////////////////
     
+
+ namespace rule
+ {
+ struct function
+ : proto::nary_expr<proto::tag::function, proto::vararg<meta_grammar> >
+ {};
+ }
+
+ template <typename Dummy>
+ struct meta_grammar::case_<proto::tag::function, Dummy>
+ : proto::when<rule::function, proto::external_transform>
+ {};
+
     namespace result_of
     {
         template <typename F,

Modified: sandbox/SOC/2010/phoenix3/libs/phoenix/test/Jamfile
==============================================================================
--- sandbox/SOC/2010/phoenix3/libs/phoenix/test/Jamfile (original)
+++ sandbox/SOC/2010/phoenix3/libs/phoenix/test/Jamfile 2010-11-24 10:14:13 EST (Wed, 24 Nov 2010)
@@ -40,14 +40,14 @@
     ;
 
 test-suite phoenix_function :
-# [ run function/function_tests.cpp ]
+ [ run function/function_tests.cpp ]
     ;
 
 test-suite phoenix_bind :
-# [ run bind/bind_function_tests.cpp ]
-# [ run bind/bind_function_object_tests.cpp ]
-# [ run bind/bind_member_function_tests.cpp ]
-# [ run bind/bind_member_variable_tests.cpp ]
+ [ run bind/bind_function_tests.cpp ]
+ [ run bind/bind_function_object_tests.cpp ]
+ [ run bind/bind_member_function_tests.cpp ]
+ [ run bind/bind_member_variable_tests.cpp ]
     ;
     
 test-suite phoenix_statement :
@@ -58,18 +58,18 @@
     ;
         
 test-suite phoenix_container :
-# [ run container/container_tests1a.cpp ]
-# [ run container/container_tests1b.cpp ]
-# [ run container/container_tests2a.cpp ]
-# [ run container/container_tests2b.cpp ]
-# [ run container/container_tests3a.cpp ]
-# [ run container/container_tests3b.cpp ]
-# [ run container/container_tests4a.cpp ]
-# [ run container/container_tests4b.cpp ]
-# [ run container/container_tests5a.cpp ]
-# [ run container/container_tests5b.cpp ]
-# [ run container/container_tests6a.cpp ]
-# [ run container/container_tests6b.cpp ]
+ [ run container/container_tests1a.cpp ]
+ [ run container/container_tests1b.cpp ]
+ [ run container/container_tests2a.cpp ]
+ [ run container/container_tests2b.cpp ]
+ [ run container/container_tests3a.cpp ]
+ [ run container/container_tests3b.cpp ]
+ [ run container/container_tests4a.cpp ]
+ [ run container/container_tests4b.cpp ]
+ [ run container/container_tests5a.cpp ]
+ [ run container/container_tests5b.cpp ]
+ [ run container/container_tests6a.cpp ]
+ [ run container/container_tests6b.cpp ]
     ;
 
 test-suite phoenix_scope :
@@ -80,41 +80,41 @@
     ;
 
 test-suite phoenix_algorithm :
-# [ run algorithm/iteration.cpp ]
-# [ run algorithm/transformation1.cpp ]
-# [ run algorithm/transformation2.cpp ]
-# [ run algorithm/transformation3.cpp ]
-# [ run algorithm/transformation4.cpp ]
-# [ run algorithm/querying.cpp ]
-# [ run algorithm/querying2.cpp ]
+ [ run algorithm/iteration.cpp ]
+ [ run algorithm/transformation1.cpp ]
+ [ run algorithm/transformation2.cpp ]
+ [ run algorithm/transformation3.cpp ]
+ [ run algorithm/transformation4.cpp ]
+ [ run algorithm/querying.cpp ]
+ [ run algorithm/querying2.cpp ]
     ;
 
 test-suite phoenix_boost_bind_compatibility :
-# [ run boost_bind_compatibility/bind_and_or_test.cpp ]
-# [ run boost_bind_compatibility/bind_cdecl_mf_test.cpp ]
-# [ run boost_bind_compatibility/bind_const_test.cpp ]
-# [ run boost_bind_compatibility/bind_cv_test.cpp ] # problem: only const operator() overloads are regarded
-# [ run boost_bind_compatibility/bind_dm_test.cpp ]
-# [ run boost_bind_compatibility/bind_dm2_test.cpp ]
-# [ run boost_bind_compatibility/bind_dm3_test.cpp ]
-# [ run boost_bind_compatibility/bind_eq_test.cpp ] # problem: binary visitation of AST for equality test not implemented
-# [ run boost_bind_compatibility/bind_eq2_test.cpp ]
-# [ run boost_bind_compatibility/bind_eq3_test.cpp ]
-# #[ run boost_bind_compatibility/bind_fastcall_mf_test.cpp ] # problem: result_of can't handle the fastcall attribute
-# #[ run boost_bind_compatibility/bind_fastcall_test.cpp ] # problem: result_of can't handle the fastcall attribute
-# [ run boost_bind_compatibility/bind_fn2_test.cpp ]
-# [ run boost_bind_compatibility/bind_function_test.cpp ] # problem: fn.contains not working properly
-# [ run boost_bind_compatibility/bind_mf2_test.cpp ]
-# [ run boost_bind_compatibility/bind_not_test.cpp ]
-# [ run boost_bind_compatibility/bind_placeholder_test.cpp ] # problem: real custom placeholders, like in the original test not implemented yet
-# [ run boost_bind_compatibility/bind_ref_test.cpp ]
-# [ run boost_bind_compatibility/bind_rel_test.cpp ]
-# [ run boost_bind_compatibility/bind_rvalue_test.cpp ]
-# [ run boost_bind_compatibility/bind_rv_sp_test.cpp ]
-# [ run boost_bind_compatibility/bind_stateful_test.cpp ] # problem: only const operator() overloads are regarded
-# #[ run boost_bind_compatibility/bind_stdcall_mf_test.cpp ] # problem: result_of can't handle the stdcall attribute
-# #[ run boost_bind_compatibility/bind_stdcall_test.cpp ] # problem: result_of can't handle the stdcall attribute
-# [ run boost_bind_compatibility/bind_test.cpp ]
+ [ run boost_bind_compatibility/bind_and_or_test.cpp ]
+ #[ run boost_bind_compatibility/bind_cdecl_mf_test.cpp ]
+ [ run boost_bind_compatibility/bind_const_test.cpp ]
+ [ run boost_bind_compatibility/bind_cv_test.cpp ]
+ [ run boost_bind_compatibility/bind_dm_test.cpp ]
+ [ run boost_bind_compatibility/bind_dm2_test.cpp ]
+ [ run boost_bind_compatibility/bind_dm3_test.cpp ]
+ [ run boost_bind_compatibility/bind_eq_test.cpp ]
+ [ run boost_bind_compatibility/bind_eq2_test.cpp ]
+ [ run boost_bind_compatibility/bind_eq3_test.cpp ]
+ #[ run boost_bind_compatibility/bind_fastcall_mf_test.cpp ] # problem: result_of can't handle the fastcall attribute
+ #[ run boost_bind_compatibility/bind_fastcall_test.cpp ] # problem: result_of can't handle the fastcall attribute
+ [ run boost_bind_compatibility/bind_fn2_test.cpp ]
+ [ run boost_bind_compatibility/bind_function_test.cpp ]
+ [ run boost_bind_compatibility/bind_mf2_test.cpp ]
+ [ run boost_bind_compatibility/bind_not_test.cpp ]
+ [ run boost_bind_compatibility/bind_placeholder_test.cpp ]
+ [ run boost_bind_compatibility/bind_ref_test.cpp ]
+ [ run boost_bind_compatibility/bind_rel_test.cpp ]
+ [ run boost_bind_compatibility/bind_rvalue_test.cpp ]
+ [ run boost_bind_compatibility/bind_rv_sp_test.cpp ]
+ [ run boost_bind_compatibility/bind_stateful_test.cpp ]
+ #[ run boost_bind_compatibility/bind_stdcall_mf_test.cpp ] # problem: result_of can't handle the stdcall attribute
+ #[ run boost_bind_compatibility/bind_stdcall_test.cpp ] # problem: result_of can't handle the stdcall attribute
+ [ run boost_bind_compatibility/bind_test.cpp ]
          ;
 
 test-suite phoenix_include :

Modified: sandbox/SOC/2010/phoenix3/libs/phoenix/test/boost_bind_compatibility/bind_cdecl_mf_test.cpp
==============================================================================
--- sandbox/SOC/2010/phoenix3/libs/phoenix/test/boost_bind_compatibility/bind_cdecl_mf_test.cpp (original)
+++ sandbox/SOC/2010/phoenix3/libs/phoenix/test/boost_bind_compatibility/bind_cdecl_mf_test.cpp 2010-11-24 10:14:13 EST (Wed, 24 Nov 2010)
@@ -7,6 +7,8 @@
     file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 ==============================================================================*/
 
+#define PHOENIX_LIMIT 10
+
 #include <boost/phoenix/core.hpp>
 #include <boost/phoenix/bind.hpp>
 #include <boost/detail/lightweight_test.hpp>
@@ -19,32 +21,32 @@
 
     X(): hash(0) {}
 
- int f0() { f1(17); return 0; }
- int g0() const { g1(17); return 0; }
-
- int f1(int a1) { hash = (hash * 17041 + a1) % 32768; return 0; }
- int g1(int a1) const { hash = (hash * 17041 + a1 * 2) % 32768; return 0; }
-
- int f2(int a1, int a2) { f1(a1); f1(a2); return 0; }
- int g2(int a1, int a2) const { g1(a1); g1(a2); return 0; }
-
- int f3(int a1, int a2, int a3) { f2(a1, a2); f1(a3); return 0; }
- int g3(int a1, int a2, int a3) const { g2(a1, a2); g1(a3); return 0; }
-
- int f4(int a1, int a2, int a3, int a4) { f3(a1, a2, a3); f1(a4); return 0; }
- int g4(int a1, int a2, int a3, int a4) const { g3(a1, a2, a3); g1(a4); return 0; }
-
- int f5(int a1, int a2, int a3, int a4, int a5) { f4(a1, a2, a3, a4); f1(a5); return 0; }
- int g5(int a1, int a2, int a3, int a4, int a5) const { g4(a1, a2, a3, a4); g1(a5); return 0; }
-
- int f6(int a1, int a2, int a3, int a4, int a5, int a6) { f5(a1, a2, a3, a4, a5); f1(a6); return 0; }
- int g6(int a1, int a2, int a3, int a4, int a5, int a6) const { g5(a1, a2, a3, a4, a5); g1(a6); return 0; }
-
- int f7(int a1, int a2, int a3, int a4, int a5, int a6, int a7) { f6(a1, a2, a3, a4, a5, a6); f1(a7); return 0; }
- int g7(int a1, int a2, int a3, int a4, int a5, int a6, int a7) const { g6(a1, a2, a3, a4, a5, a6); g1(a7); return 0; }
-
- int f8(int a1, int a2, int a3, int a4, int a5, int a6, int a7, int a8) { f7(a1, a2, a3, a4, a5, a6, a7); f1(a8); return 0; }
- int g8(int a1, int a2, int a3, int a4, int a5, int a6, int a7, int a8) const { g7(a1, a2, a3, a4, a5, a6, a7); g1(a8); return 0; }
+ int __cdecl f0() { f1(17); return 0; }
+ int __cdecl g0() const { g1(17); return 0; }
+
+ int __cdecl f1(int a1) { hash = (hash * 17041 + a1) % 32768; return 0; }
+ int __cdecl g1(int a1) const { hash = (hash * 17041 + a1 * 2) % 32768; return 0; }
+
+ int __cdecl f2(int a1, int a2) { f1(a1); f1(a2); return 0; }
+ int __cdecl g2(int a1, int a2) const { g1(a1); g1(a2); return 0; }
+
+ int __cdecl f3(int a1, int a2, int a3) { f2(a1, a2); f1(a3); return 0; }
+ int __cdecl g3(int a1, int a2, int a3) const { g2(a1, a2); g1(a3); return 0; }
+
+ int __cdecl f4(int a1, int a2, int a3, int a4) { f3(a1, a2, a3); f1(a4); return 0; }
+ int __cdecl g4(int a1, int a2, int a3, int a4) const { g3(a1, a2, a3); g1(a4); return 0; }
+
+ int __cdecl f5(int a1, int a2, int a3, int a4, int a5) { f4(a1, a2, a3, a4); f1(a5); return 0; }
+ int __cdecl g5(int a1, int a2, int a3, int a4, int a5) const { g4(a1, a2, a3, a4); g1(a5); return 0; }
+
+ int __cdecl f6(int a1, int a2, int a3, int a4, int a5, int a6) { f5(a1, a2, a3, a4, a5); f1(a6); return 0; }
+ int __cdecl g6(int a1, int a2, int a3, int a4, int a5, int a6) const { g5(a1, a2, a3, a4, a5); g1(a6); return 0; }
+
+ int __cdecl f7(int a1, int a2, int a3, int a4, int a5, int a6, int a7) { f6(a1, a2, a3, a4, a5, a6); f1(a7); return 0; }
+ int __cdecl g7(int a1, int a2, int a3, int a4, int a5, int a6, int a7) const { g6(a1, a2, a3, a4, a5, a6); g1(a7); return 0; }
+
+ int __cdecl f8(int a1, int a2, int a3, int a4, int a5, int a6, int a7, int a8) { f7(a1, a2, a3, a4, a5, a6, a7); f1(a8); return 0; }
+ int __cdecl g8(int a1, int a2, int a3, int a4, int a5, int a6, int a7, int a8) const { g7(a1, a2, a3, a4, a5, a6, a7); g1(a8); return 0; }
 };
 
 void member_function_test()

Modified: sandbox/SOC/2010/phoenix3/libs/phoenix/test/boost_bind_compatibility/bind_const_test.cpp
==============================================================================
--- sandbox/SOC/2010/phoenix3/libs/phoenix/test/boost_bind_compatibility/bind_const_test.cpp (original)
+++ sandbox/SOC/2010/phoenix3/libs/phoenix/test/boost_bind_compatibility/bind_const_test.cpp 2010-11-24 10:14:13 EST (Wed, 24 Nov 2010)
@@ -17,6 +17,8 @@
 #pragma warning(disable: 4514) // unreferenced inline removed
 #endif
 
+#define PHOENIX_LIMIT 10
+
 #include <boost/phoenix/core.hpp>
 #include <boost/phoenix/bind.hpp>
 

Modified: sandbox/SOC/2010/phoenix3/libs/phoenix/test/boost_bind_compatibility/bind_cv_test.cpp
==============================================================================
--- sandbox/SOC/2010/phoenix3/libs/phoenix/test/boost_bind_compatibility/bind_cv_test.cpp (original)
+++ sandbox/SOC/2010/phoenix3/libs/phoenix/test/boost_bind_compatibility/bind_cv_test.cpp 2010-11-24 10:14:13 EST (Wed, 24 Nov 2010)
@@ -16,6 +16,8 @@
 #pragma warning(disable: 4514) // unreferenced inline removed
 #endif
 
+#define PHOENIX_LIMIT 10
+
 #include <boost/phoenix/core.hpp>
 #include <boost/phoenix/bind.hpp>
 
@@ -140,12 +142,15 @@
 {
     F const & cf = f;
     BOOST_TEST( cf() == -r );
- //BOOST_TEST( f() == r );
+ BOOST_TEST( f() == r );
+
 }
 
 int main()
 {
     using boost::phoenix::bind;
+ using boost::phoenix::ref;
+ using boost::phoenix::cref;
 
     test( bind(X()), 17041);
     test( bind(X(), 1), 1);

Modified: sandbox/SOC/2010/phoenix3/libs/phoenix/test/boost_bind_compatibility/bind_eq_test.cpp
==============================================================================
--- sandbox/SOC/2010/phoenix3/libs/phoenix/test/boost_bind_compatibility/bind_eq_test.cpp (original)
+++ sandbox/SOC/2010/phoenix3/libs/phoenix/test/boost_bind_compatibility/bind_eq_test.cpp 2010-11-24 10:14:13 EST (Wed, 24 Nov 2010)
@@ -16,6 +16,9 @@
 #pragma warning(disable: 4514) // unreferenced inline removed
 #endif
 
+
+#define PHOENIX_LIMIT 10
+
 #include <boost/phoenix/core.hpp>
 #include <boost/phoenix/bind.hpp>
 
@@ -189,7 +192,7 @@
 template<class F, class V> void test_1_(F f, V v1, V v2)
 {
     test_eq( bind(f, v1), bind(f, v1) );
- //test_ne( bind(f, v1), bind(f, v2) );
+ test_ne( bind(f, v1), bind(f, v2) );
 }
 
 template<class F> void test_1(F f)
@@ -207,8 +210,8 @@
 template<class F, class V> void test_2_(F f, V v1, V v2)
 {
     test_eq( bind(f, v1, v1), bind(f, v1, v1) );
- //test_ne( bind(f, v1, v1), bind(f, v1, v2) );
- //test_ne( bind(f, v1, v1), bind(f, v2, v1) );
+ test_ne( bind(f, v1, v1), bind(f, v1, v2) );
+ test_ne( bind(f, v1, v1), bind(f, v2, v1) );
 }
 
 template<class F> void test_2(F f)
@@ -226,9 +229,9 @@
 template<class F, class V> void test_3_(F f, V v1, V v2)
 {
     test_eq( bind(f, v1, v1, v1), bind(f, v1, v1, v1) );
- //test_ne( bind(f, v1, v1, v1), bind(f, v1, v1, v2) );
- //test_ne( bind(f, v1, v1, v1), bind(f, v1, v2, v1) );
- //test_ne( bind(f, v1, v1, v1), bind(f, v2, v1, v1) );
+ test_ne( bind(f, v1, v1, v1), bind(f, v1, v1, v2) );
+ test_ne( bind(f, v1, v1, v1), bind(f, v1, v2, v1) );
+ test_ne( bind(f, v1, v1, v1), bind(f, v2, v1, v1) );
 }
 
 template<class F> void test_3(F f)
@@ -246,10 +249,10 @@
 template<class F, class V> void test_4_(F f, V v1, V v2)
 {
     test_eq( bind(f, v1, v1, v1, v1), bind(f, v1, v1, v1, v1) );
- //test_ne( bind(f, v1, v1, v1, v1), bind(f, v1, v1, v1, v2) );
- //test_ne( bind(f, v1, v1, v1, v1), bind(f, v1, v1, v2, v1) );
- //test_ne( bind(f, v1, v1, v1, v1), bind(f, v1, v2, v1, v1) );
- //test_ne( bind(f, v1, v1, v1, v1), bind(f, v2, v1, v1, v1) );
+ test_ne( bind(f, v1, v1, v1, v1), bind(f, v1, v1, v1, v2) );
+ test_ne( bind(f, v1, v1, v1, v1), bind(f, v1, v1, v2, v1) );
+ test_ne( bind(f, v1, v1, v1, v1), bind(f, v1, v2, v1, v1) );
+ test_ne( bind(f, v1, v1, v1, v1), bind(f, v2, v1, v1, v1) );
 }
 
 template<class F> void test_4(F f)
@@ -267,11 +270,11 @@
 template<class F, class V> void test_5_(F f, V v1, V v2)
 {
     test_eq( bind(f, v1, v1, v1, v1, v1), bind(f, v1, v1, v1, v1, v1) );
- //test_ne( bind(f, v1, v1, v1, v1, v1), bind(f, v1, v1, v1, v1, v2) );
- //test_ne( bind(f, v1, v1, v1, v1, v1), bind(f, v1, v1, v1, v2, v1) );
- //test_ne( bind(f, v1, v1, v1, v1, v1), bind(f, v1, v1, v2, v1, v1) );
- //test_ne( bind(f, v1, v1, v1, v1, v1), bind(f, v1, v2, v1, v1, v1) );
- //test_ne( bind(f, v1, v1, v1, v1, v1), bind(f, v2, v1, v1, v1, v1) );
+ test_ne( bind(f, v1, v1, v1, v1, v1), bind(f, v1, v1, v1, v1, v2) );
+ test_ne( bind(f, v1, v1, v1, v1, v1), bind(f, v1, v1, v1, v2, v1) );
+ test_ne( bind(f, v1, v1, v1, v1, v1), bind(f, v1, v1, v2, v1, v1) );
+ test_ne( bind(f, v1, v1, v1, v1, v1), bind(f, v1, v2, v1, v1, v1) );
+ test_ne( bind(f, v1, v1, v1, v1, v1), bind(f, v2, v1, v1, v1, v1) );
 }
 
 template<class F> void test_5(F f)
@@ -289,12 +292,12 @@
 template<class F, class V> void test_6_(F f, V v1, V v2)
 {
     test_eq( bind(f, v1, v1, v1, v1, v1, v1), bind(f, v1, v1, v1, v1, v1, v1) );
- //test_ne( bind(f, v1, v1, v1, v1, v1, v1), bind(f, v1, v1, v1, v1, v1, v2) );
- //test_ne( bind(f, v1, v1, v1, v1, v1, v1), bind(f, v1, v1, v1, v1, v2, v1) );
- //test_ne( bind(f, v1, v1, v1, v1, v1, v1), bind(f, v1, v1, v1, v2, v1, v1) );
- //test_ne( bind(f, v1, v1, v1, v1, v1, v1), bind(f, v1, v1, v2, v1, v1, v1) );
- //test_ne( bind(f, v1, v1, v1, v1, v1, v1), bind(f, v1, v2, v1, v1, v1, v1) );
- //test_ne( bind(f, v1, v1, v1, v1, v1, v1), bind(f, v2, v1, v1, v1, v1, v1) );
+ test_ne( bind(f, v1, v1, v1, v1, v1, v1), bind(f, v1, v1, v1, v1, v1, v2) );
+ test_ne( bind(f, v1, v1, v1, v1, v1, v1), bind(f, v1, v1, v1, v1, v2, v1) );
+ test_ne( bind(f, v1, v1, v1, v1, v1, v1), bind(f, v1, v1, v1, v2, v1, v1) );
+ test_ne( bind(f, v1, v1, v1, v1, v1, v1), bind(f, v1, v1, v2, v1, v1, v1) );
+ test_ne( bind(f, v1, v1, v1, v1, v1, v1), bind(f, v1, v2, v1, v1, v1, v1) );
+ test_ne( bind(f, v1, v1, v1, v1, v1, v1), bind(f, v2, v1, v1, v1, v1, v1) );
 }
 
 template<class F> void test_6(F f)
@@ -312,13 +315,13 @@
 template<class F, class V> void test_7_(F f, V v1, V v2)
 {
     test_eq( bind(f, v1, v1, v1, v1, v1, v1, v1), bind(f, v1, v1, v1, v1, v1, v1, v1) );
- //test_ne( bind(f, v1, v1, v1, v1, v1, v1, v1), bind(f, v1, v1, v1, v1, v1, v1, v2) );
- //test_ne( bind(f, v1, v1, v1, v1, v1, v1, v1), bind(f, v1, v1, v1, v1, v1, v2, v1) );
- //test_ne( bind(f, v1, v1, v1, v1, v1, v1, v1), bind(f, v1, v1, v1, v1, v2, v1, v1) );
- //test_ne( bind(f, v1, v1, v1, v1, v1, v1, v1), bind(f, v1, v1, v1, v2, v1, v1, v1) );
- //test_ne( bind(f, v1, v1, v1, v1, v1, v1, v1), bind(f, v1, v1, v2, v1, v1, v1, v1) );
- //test_ne( bind(f, v1, v1, v1, v1, v1, v1, v1), bind(f, v1, v2, v1, v1, v1, v1, v1) );
- //test_ne( bind(f, v1, v1, v1, v1, v1, v1, v1), bind(f, v2, v1, v1, v1, v1, v1, v1) );
+ test_ne( bind(f, v1, v1, v1, v1, v1, v1, v1), bind(f, v1, v1, v1, v1, v1, v1, v2) );
+ test_ne( bind(f, v1, v1, v1, v1, v1, v1, v1), bind(f, v1, v1, v1, v1, v1, v2, v1) );
+ test_ne( bind(f, v1, v1, v1, v1, v1, v1, v1), bind(f, v1, v1, v1, v1, v2, v1, v1) );
+ test_ne( bind(f, v1, v1, v1, v1, v1, v1, v1), bind(f, v1, v1, v1, v2, v1, v1, v1) );
+ test_ne( bind(f, v1, v1, v1, v1, v1, v1, v1), bind(f, v1, v1, v2, v1, v1, v1, v1) );
+ test_ne( bind(f, v1, v1, v1, v1, v1, v1, v1), bind(f, v1, v2, v1, v1, v1, v1, v1) );
+ test_ne( bind(f, v1, v1, v1, v1, v1, v1, v1), bind(f, v2, v1, v1, v1, v1, v1, v1) );
 }
 
 template<class F> void test_7(F f)
@@ -336,14 +339,14 @@
 template<class F, class V> void test_8_(F f, V v1, V v2)
 {
     test_eq( bind(f, v1, v1, v1, v1, v1, v1, v1, v1), bind(f, v1, v1, v1, v1, v1, v1, v1, v1) );
- //test_ne( bind(f, v1, v1, v1, v1, v1, v1, v1, v1), bind(f, v1, v1, v1, v1, v1, v1, v1, v2) );
- //test_ne( bind(f, v1, v1, v1, v1, v1, v1, v1, v1), bind(f, v1, v1, v1, v1, v1, v1, v2, v1) );
- //test_ne( bind(f, v1, v1, v1, v1, v1, v1, v1, v1), bind(f, v1, v1, v1, v1, v1, v2, v1, v1) );
- //test_ne( bind(f, v1, v1, v1, v1, v1, v1, v1, v1), bind(f, v1, v1, v1, v1, v2, v1, v1, v1) );
- //test_ne( bind(f, v1, v1, v1, v1, v1, v1, v1, v1), bind(f, v1, v1, v1, v2, v1, v1, v1, v1) );
- //test_ne( bind(f, v1, v1, v1, v1, v1, v1, v1, v1), bind(f, v1, v1, v2, v1, v1, v1, v1, v1) );
- //test_ne( bind(f, v1, v1, v1, v1, v1, v1, v1, v1), bind(f, v1, v2, v1, v1, v1, v1, v1, v1) );
- //test_ne( bind(f, v1, v1, v1, v1, v1, v1, v1, v1), bind(f, v2, v1, v1, v1, v1, v1, v1, v1) );
+ test_ne( bind(f, v1, v1, v1, v1, v1, v1, v1, v1), bind(f, v1, v1, v1, v1, v1, v1, v1, v2) );
+ test_ne( bind(f, v1, v1, v1, v1, v1, v1, v1, v1), bind(f, v1, v1, v1, v1, v1, v1, v2, v1) );
+ test_ne( bind(f, v1, v1, v1, v1, v1, v1, v1, v1), bind(f, v1, v1, v1, v1, v1, v2, v1, v1) );
+ test_ne( bind(f, v1, v1, v1, v1, v1, v1, v1, v1), bind(f, v1, v1, v1, v1, v2, v1, v1, v1) );
+ test_ne( bind(f, v1, v1, v1, v1, v1, v1, v1, v1), bind(f, v1, v1, v1, v2, v1, v1, v1, v1) );
+ test_ne( bind(f, v1, v1, v1, v1, v1, v1, v1, v1), bind(f, v1, v1, v2, v1, v1, v1, v1, v1) );
+ test_ne( bind(f, v1, v1, v1, v1, v1, v1, v1, v1), bind(f, v1, v2, v1, v1, v1, v1, v1, v1) );
+ test_ne( bind(f, v1, v1, v1, v1, v1, v1, v1, v1), bind(f, v2, v1, v1, v1, v1, v1, v1, v1) );
 }
 
 template<class F> void test_8(F f)
@@ -361,15 +364,15 @@
 template<class F, class V> void test_9_(F f, V v1, V v2)
 {
     test_eq( bind(f, v1, v1, v1, v1, v1, v1, v1, v1, v1), bind(f, v1, v1, v1, v1, v1, v1, v1, v1, v1) );
- //test_ne( bind(f, v1, v1, v1, v1, v1, v1, v1, v1, v1), bind(f, v1, v1, v1, v1, v1, v1, v1, v1, v2) );
- //test_ne( bind(f, v1, v1, v1, v1, v1, v1, v1, v1, v1), bind(f, v1, v1, v1, v1, v1, v1, v1, v2, v1) );
- //test_ne( bind(f, v1, v1, v1, v1, v1, v1, v1, v1, v1), bind(f, v1, v1, v1, v1, v1, v1, v2, v1, v1) );
- //test_ne( bind(f, v1, v1, v1, v1, v1, v1, v1, v1, v1), bind(f, v1, v1, v1, v1, v1, v2, v1, v1, v1) );
- //test_ne( bind(f, v1, v1, v1, v1, v1, v1, v1, v1, v1), bind(f, v1, v1, v1, v1, v2, v1, v1, v1, v1) );
- //test_ne( bind(f, v1, v1, v1, v1, v1, v1, v1, v1, v1), bind(f, v1, v1, v1, v2, v1, v1, v1, v1, v1) );
- //test_ne( bind(f, v1, v1, v1, v1, v1, v1, v1, v1, v1), bind(f, v1, v1, v2, v1, v1, v1, v1, v1, v1) );
- //test_ne( bind(f, v1, v1, v1, v1, v1, v1, v1, v1, v1), bind(f, v1, v2, v1, v1, v1, v1, v1, v1, v1) );
- //test_ne( bind(f, v1, v1, v1, v1, v1, v1, v1, v1, v1), bind(f, v2, v1, v1, v1, v1, v1, v1, v1, v1) );
+ test_ne( bind(f, v1, v1, v1, v1, v1, v1, v1, v1, v1), bind(f, v1, v1, v1, v1, v1, v1, v1, v1, v2) );
+ test_ne( bind(f, v1, v1, v1, v1, v1, v1, v1, v1, v1), bind(f, v1, v1, v1, v1, v1, v1, v1, v2, v1) );
+ test_ne( bind(f, v1, v1, v1, v1, v1, v1, v1, v1, v1), bind(f, v1, v1, v1, v1, v1, v1, v2, v1, v1) );
+ test_ne( bind(f, v1, v1, v1, v1, v1, v1, v1, v1, v1), bind(f, v1, v1, v1, v1, v1, v2, v1, v1, v1) );
+ test_ne( bind(f, v1, v1, v1, v1, v1, v1, v1, v1, v1), bind(f, v1, v1, v1, v1, v2, v1, v1, v1, v1) );
+ test_ne( bind(f, v1, v1, v1, v1, v1, v1, v1, v1, v1), bind(f, v1, v1, v1, v2, v1, v1, v1, v1, v1) );
+ test_ne( bind(f, v1, v1, v1, v1, v1, v1, v1, v1, v1), bind(f, v1, v1, v2, v1, v1, v1, v1, v1, v1) );
+ test_ne( bind(f, v1, v1, v1, v1, v1, v1, v1, v1, v1), bind(f, v1, v2, v1, v1, v1, v1, v1, v1, v1) );
+ test_ne( bind(f, v1, v1, v1, v1, v1, v1, v1, v1, v1), bind(f, v2, v1, v1, v1, v1, v1, v1, v1, v1) );
 }
 
 template<class F> void test_9(F f)

Modified: sandbox/SOC/2010/phoenix3/libs/phoenix/test/boost_bind_compatibility/bind_fn2_test.cpp
==============================================================================
--- sandbox/SOC/2010/phoenix3/libs/phoenix/test/boost_bind_compatibility/bind_fn2_test.cpp (original)
+++ sandbox/SOC/2010/phoenix3/libs/phoenix/test/boost_bind_compatibility/bind_fn2_test.cpp 2010-11-24 10:14:13 EST (Wed, 24 Nov 2010)
@@ -16,6 +16,8 @@
 #pragma warning(disable: 4514) // unreferenced inline removed
 #endif
 
+#define PHOENIX_LIMIT 10
+
 #include <boost/phoenix/core.hpp>
 #include <boost/phoenix/bind.hpp>
 

Modified: sandbox/SOC/2010/phoenix3/libs/phoenix/test/boost_bind_compatibility/bind_function_test.cpp
==============================================================================
--- sandbox/SOC/2010/phoenix3/libs/phoenix/test/boost_bind_compatibility/bind_function_test.cpp (original)
+++ sandbox/SOC/2010/phoenix3/libs/phoenix/test/boost_bind_compatibility/bind_function_test.cpp 2010-11-24 10:14:13 EST (Wed, 24 Nov 2010)
@@ -56,23 +56,23 @@
     BOOST_TEST( fn() == 1 );
 
     BOOST_TEST( fn.contains( bind( f, 1 ) ) );
- //BOOST_TEST( !fn.contains( bind( f, 2 ) ) );
- //BOOST_TEST( !fn.contains( bind( g, 1 ) ) );
+ BOOST_TEST( !fn.contains( bind( f, 2 ) ) );
+ BOOST_TEST( !fn.contains( bind( g, 1 ) ) );
 
     fn = bind( f, 2 );
 
     BOOST_TEST( fn() == 2 );
 
- //BOOST_TEST( !fn.contains( bind( f, 1 ) ) );
+ BOOST_TEST( !fn.contains( bind( f, 1 ) ) );
     BOOST_TEST( fn.contains( bind( f, 2 ) ) );
- //BOOST_TEST( !fn.contains( bind( g, 1 ) ) );
+ BOOST_TEST( !fn.contains( bind( g, 1 ) ) );
 
     fn = bind( g, 1 );
 
     BOOST_TEST( fn() == 2 );
 
- //BOOST_TEST( !fn.contains( bind( f, 1 ) ) );
- //BOOST_TEST( !fn.contains( bind( f, 2 ) ) );
+ BOOST_TEST( !fn.contains( bind( f, 1 ) ) );
+ BOOST_TEST( !fn.contains( bind( f, 2 ) ) );
     BOOST_TEST( fn.contains( bind( g, 1 ) ) );
 
     return boost::report_errors();

Modified: sandbox/SOC/2010/phoenix3/libs/phoenix/test/boost_bind_compatibility/bind_mf2_test.cpp
==============================================================================
--- sandbox/SOC/2010/phoenix3/libs/phoenix/test/boost_bind_compatibility/bind_mf2_test.cpp (original)
+++ sandbox/SOC/2010/phoenix3/libs/phoenix/test/boost_bind_compatibility/bind_mf2_test.cpp 2010-11-24 10:14:13 EST (Wed, 24 Nov 2010)
@@ -16,6 +16,8 @@
 #pragma warning(disable: 4514) // unreferenced inline removed
 #endif
 
+#define PHOENIX_LIMIT 10
+
 #include <boost/phoenix/core.hpp>
 #include <boost/phoenix/bind.hpp>
 

Modified: sandbox/SOC/2010/phoenix3/libs/phoenix/test/boost_bind_compatibility/bind_not_test.cpp
==============================================================================
--- sandbox/SOC/2010/phoenix3/libs/phoenix/test/boost_bind_compatibility/bind_not_test.cpp (original)
+++ sandbox/SOC/2010/phoenix3/libs/phoenix/test/boost_bind_compatibility/bind_not_test.cpp 2010-11-24 10:14:13 EST (Wed, 24 Nov 2010)
@@ -18,6 +18,7 @@
 
 #include <boost/phoenix/core.hpp>
 #include <boost/phoenix/bind.hpp>
+#include <boost/phoenix/operator.hpp>
 
 #if defined(BOOST_MSVC) && (BOOST_MSVC < 1300)
 #pragma warning(push, 3)
@@ -33,7 +34,7 @@
 
 template<class F, class A1, class R> void test( F f, A1 a1, R r )
 {
- BOOST_TEST( !f(a1) == r );
+ BOOST_TEST( f(a1) == r );
 }
 
 bool f( bool v )
@@ -51,14 +52,10 @@
     using boost::phoenix::bind;
     using boost::phoenix::placeholders::_1;
 
- //test( !bind( f, true ), 0, !f( true ) );
- test( bind( f, true ), 0, !f( true ) );
- //test( !bind( g, _1 ), 5, !g( 5 ) );
- test( bind( g, _1 ), 5, !g( 5 ) );
- //test( bind( f, !bind( f, true ) ), 0, f( !f( true ) ) );
- test( bind( f, bind( f, true ) ), 0, f( !f( true ) ) );
- //test( bind( f, !bind( f, _1 ) ), true, f( !f( true ) ) );
- test( bind( f, bind( f, _1 ) ), true, f( !f( true ) ) );
+ test( !bind( f, true ), 0, !f( true ) );
+ test( !bind( g, _1 ), 5, !g( 5 ) );
+ test( bind( f, !bind( f, true ) ), 0, f( !f( true ) ) );
+ test( bind( f, !bind( f, _1 ) ), true, f( !f( true ) ) );
 
     return boost::report_errors();
 }

Modified: sandbox/SOC/2010/phoenix3/libs/phoenix/test/boost_bind_compatibility/bind_placeholder_test.cpp
==============================================================================
--- sandbox/SOC/2010/phoenix3/libs/phoenix/test/boost_bind_compatibility/bind_placeholder_test.cpp (original)
+++ sandbox/SOC/2010/phoenix3/libs/phoenix/test/boost_bind_compatibility/bind_placeholder_test.cpp 2010-11-24 10:14:13 EST (Wed, 24 Nov 2010)
@@ -18,6 +18,8 @@
 
 #endif
 
+#define PHOENIX_LIMIT 10
+
 #include <boost/phoenix/core.hpp>
 #include <boost/phoenix/bind.hpp>
 
@@ -45,22 +47,20 @@
 {
 };
 
-/*
 namespace boost
 {
 
 template< int I > struct is_placeholder< custom_placeholder< I > >
+ : mpl::true_
 {
     enum { value = I };
 };
 
 } // namespace boost
-*/
 
 int main()
 {
     using boost::phoenix::bind;
- using boost::phoenix::make_argument;
 
     int const x1 = 1;
     int const x2 = 2;
@@ -72,15 +72,15 @@
     int const x8 = 8;
     int const x9 = 9;
 
- make_argument<custom_placeholder<0> >::type const p1 = {};
- make_argument<custom_placeholder<1> >::type const p2 = {};
- make_argument<custom_placeholder<2> >::type const p3 = {};
- make_argument<custom_placeholder<3> >::type const p4 = {};
- make_argument<custom_placeholder<4> >::type const p5 = {};
- make_argument<custom_placeholder<5> >::type const p6 = {};
- make_argument<custom_placeholder<6> >::type const p7 = {};
- make_argument<custom_placeholder<7> >::type const p8 = {};
- make_argument<custom_placeholder<8> >::type const p9 = {};
+ custom_placeholder<0> p1;
+ custom_placeholder<1> p2;
+ custom_placeholder<2> p3;
+ custom_placeholder<3> p4;
+ custom_placeholder<4> p5;
+ custom_placeholder<5> p6;
+ custom_placeholder<6> p7;
+ custom_placeholder<7> p8;
+ custom_placeholder<8> p9;
 
     BOOST_TEST(
         bind( f, p1, p2, p3, p4, p5, p6, p7, p8, p9 )

Modified: sandbox/SOC/2010/phoenix3/libs/phoenix/test/boost_bind_compatibility/bind_rel_test.cpp
==============================================================================
--- sandbox/SOC/2010/phoenix3/libs/phoenix/test/boost_bind_compatibility/bind_rel_test.cpp (original)
+++ sandbox/SOC/2010/phoenix3/libs/phoenix/test/boost_bind_compatibility/bind_rel_test.cpp 2010-11-24 10:14:13 EST (Wed, 24 Nov 2010)
@@ -91,7 +91,6 @@
 
     // bind op bind
 
- // important: bind( f, _1 ) and bind( g, _1 ) have the same type
     BOOST_TEST( ( bind( f, _1 ) == bind( g, _1 ) )( x ) );
     BOOST_TEST( !( ( bind( f, _1 ) != bind( g, _1 ) )( x ) ) );
     BOOST_TEST( !( ( bind( f, _1 ) < bind( g, _1 ) )( x ) ) );

Modified: sandbox/SOC/2010/phoenix3/libs/phoenix/test/boost_bind_compatibility/bind_rv_sp_test.cpp
==============================================================================
--- sandbox/SOC/2010/phoenix3/libs/phoenix/test/boost_bind_compatibility/bind_rv_sp_test.cpp (original)
+++ sandbox/SOC/2010/phoenix3/libs/phoenix/test/boost_bind_compatibility/bind_rv_sp_test.cpp 2010-11-24 10:14:13 EST (Wed, 24 Nov 2010)
@@ -40,7 +40,7 @@
     {
     }
 
- int f() const
+ int f()
     {
         return v_;
     }

Modified: sandbox/SOC/2010/phoenix3/libs/phoenix/test/boost_bind_compatibility/bind_rvalue_test.cpp
==============================================================================
--- sandbox/SOC/2010/phoenix3/libs/phoenix/test/boost_bind_compatibility/bind_rvalue_test.cpp (original)
+++ sandbox/SOC/2010/phoenix3/libs/phoenix/test/boost_bind_compatibility/bind_rvalue_test.cpp 2010-11-24 10:14:13 EST (Wed, 24 Nov 2010)
@@ -18,6 +18,8 @@
 
 #endif
 
+#define PHOENIX_LIMIT 10
+
 #include <boost/phoenix/core.hpp>
 #include <boost/phoenix/bind.hpp>
 

Modified: sandbox/SOC/2010/phoenix3/libs/phoenix/test/boost_bind_compatibility/bind_stateful_test.cpp
==============================================================================
--- sandbox/SOC/2010/phoenix3/libs/phoenix/test/boost_bind_compatibility/bind_stateful_test.cpp (original)
+++ sandbox/SOC/2010/phoenix3/libs/phoenix/test/boost_bind_compatibility/bind_stateful_test.cpp 2010-11-24 10:14:13 EST (Wed, 24 Nov 2010)
@@ -16,6 +16,8 @@
 #pragma warning(disable: 4514) // unreferenced inline removed
 #endif
 
+#define PHOENIX_LIMIT 10
+
 #include <boost/phoenix/core.hpp>
 #include <boost/phoenix/bind.hpp>
 
@@ -35,7 +37,7 @@
 {
 private:
 
- mutable int state_;
+ int state_;
 
 public:
 
@@ -50,52 +52,52 @@
 
     typedef int result_type;
 
- int operator()() const
+ int operator()()
     {
         return state_ += 17041;
     }
 
- int operator()(int x1) const
+ int operator()(int x1)
     {
         return state_ += x1;
     }
 
- int operator()(int x1, int x2) const
+ int operator()(int x1, int x2)
     {
         return state_ += x1+x2;
     }
 
- int operator()(int x1, int x2, int x3) const
+ int operator()(int x1, int x2, int x3)
     {
         return state_ += x1+x2+x3;
     }
 
- int operator()(int x1, int x2, int x3, int x4) const
+ int operator()(int x1, int x2, int x3, int x4)
     {
         return state_ += x1+x2+x3+x4;
     }
 
- int operator()(int x1, int x2, int x3, int x4, int x5) const
+ int operator()(int x1, int x2, int x3, int x4, int x5)
     {
         return state_ += x1+x2+x3+x4+x5;
     }
 
- int operator()(int x1, int x2, int x3, int x4, int x5, int x6) const
+ int operator()(int x1, int x2, int x3, int x4, int x5, int x6)
     {
         return state_ += x1+x2+x3+x4+x5+x6;
     }
 
- int operator()(int x1, int x2, int x3, int x4, int x5, int x6, int x7) const
+ int operator()(int x1, int x2, int x3, int x4, int x5, int x6, int x7)
     {
         return state_ += x1+x2+x3+x4+x5+x6+x7;
     }
 
- int operator()(int x1, int x2, int x3, int x4, int x5, int x6, int x7, int x8) const
+ int operator()(int x1, int x2, int x3, int x4, int x5, int x6, int x7, int x8)
     {
         return state_ += x1+x2+x3+x4+x5+x6+x7+x8;
     }
 
- int operator()(int x1, int x2, int x3, int x4, int x5, int x6, int x7, int x8, int x9) const
+ int operator()(int x1, int x2, int x3, int x4, int x5, int x6, int x7, int x8, int x9)
     {
         return state_ += x1+x2+x3+x4+x5+x6+x7+x8+x9;
     }
@@ -210,19 +212,6 @@
 {
     using boost::phoenix::ref;
 
- int state = 0;;
- /*
- test( bind( f0, ref(state)), state, 17041 );
- test( bind( f1, ref(state), 1 ), state, 1 );
- test( bind( f2, ref(state), 1, 2 ), state, 1+2 );
- test( bind( f3, ref(state), 1, 2, 3 ), state, 1+2+3 );
- test( bind( f4, ref(state), 1, 2, 3, 4 ), state, 1+2+3+4 );
- test( bind( f5, ref(state), 1, 2, 3, 4, 5 ), state, 1+2+3+4+5 );
- test( bind( f6, ref(state), 1, 2, 3, 4, 5, 6 ), state, 1+2+3+4+5+6 );
- test( bind( f7, ref(state), 1, 2, 3, 4, 5, 6, 7 ), state, 1+2+3+4+5+6+7 );
- test( bind( f8, ref(state), 1, 2, 3, 4, 5, 6, 7, 8 ), state, 1+2+3+4+5+6+7+8 );
- */
- /*
     test( bind( f0, 0), 0, 17041 );
     test( bind( f1, 0, 1 ), 0, 1 );
     test( bind( f2, 0, 1, 2 ), 0, 1+2 );
@@ -232,7 +221,6 @@
     test( bind( f6, 0, 1, 2, 3, 4, 5, 6 ), 0, 1+2+3+4+5+6 );
     test( bind( f7, 0, 1, 2, 3, 4, 5, 6, 7 ), 0, 1+2+3+4+5+6+7 );
     test( bind( f8, 0, 1, 2, 3, 4, 5, 6, 7, 8 ), 0, 1+2+3+4+5+6+7+8 );
- */
 }
 
 int main()

Modified: sandbox/SOC/2010/phoenix3/libs/phoenix/test/boost_bind_compatibility/bind_test.cpp
==============================================================================
--- sandbox/SOC/2010/phoenix3/libs/phoenix/test/boost_bind_compatibility/bind_test.cpp (original)
+++ sandbox/SOC/2010/phoenix3/libs/phoenix/test/boost_bind_compatibility/bind_test.cpp 2010-11-24 10:14:13 EST (Wed, 24 Nov 2010)
@@ -17,6 +17,8 @@
 #pragma warning(disable: 4514) // unreferenced inline removed
 #endif
 
+#define PHOENIX_LIMIT 10
+
 #include <boost/phoenix/core.hpp>
 #include <boost/phoenix/bind.hpp>
 

Modified: sandbox/SOC/2010/phoenix3/libs/phoenix/test/boost_bind_compatibility/bind_visit_test.cpp
==============================================================================
--- sandbox/SOC/2010/phoenix3/libs/phoenix/test/boost_bind_compatibility/bind_visit_test.cpp (original)
+++ sandbox/SOC/2010/phoenix3/libs/phoenix/test/boost_bind_compatibility/bind_visit_test.cpp 2010-11-24 10:14:13 EST (Wed, 24 Nov 2010)
@@ -38,18 +38,18 @@
 
 struct visitor
 {
- mutable int hash;
+ int hash;
 
     visitor(): hash( 0 )
     {
     }
 
- template<typename T> void operator()( T const & t ) const
+ template<typename T> void operator()( T const & t )
     {
         std::cout << "visitor::operator()( T ): " << typeid( t ).name() << std::endl;
     }
 
- void operator()( int const & t ) const
+ void operator()( int const & t )
     {
         std::cout << "visitor::operator()( int ): " << t << std::endl;
         hash = hash * 10 + t;


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