Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r74041 - in trunk: boost/phoenix/bind libs/phoenix/test libs/phoenix/test/bind libs/phoenix/test/scope
From: thom.heller_at_[hidden]
Date: 2011-08-24 05:53:00


Author: theller
Date: 2011-08-24 05:52:58 EDT (Wed, 24 Aug 2011)
New Revision: 74041
URL: http://svn.boost.org/trac/boost/changeset/74041

Log:
[phoenix]

    Fixing bug #5782

Added:
   trunk/libs/phoenix/test/bind/bug5782.cpp (contents, props changed)
Text files modified:
   trunk/boost/phoenix/bind/bind_function.hpp | 6 +++---
   trunk/libs/phoenix/test/Jamfile | 1 +
   trunk/libs/phoenix/test/scope/lambda_tests.cpp | 2 +-
   3 files changed, 5 insertions(+), 4 deletions(-)

Modified: trunk/boost/phoenix/bind/bind_function.hpp
==============================================================================
--- trunk/boost/phoenix/bind/bind_function.hpp (original)
+++ trunk/boost/phoenix/bind/bind_function.hpp 2011-08-24 05:52:58 EDT (Wed, 24 Aug 2011)
@@ -36,12 +36,12 @@
>
     inline
     typename detail::expression::function_eval<
- detail::function_ptr<1, RT, RT(*)(T0 &)>
+ detail::function_ptr<1, RT, RT(*)(T0)>
       , A0
>::type const
- bind(RT(*f)(T0 &), A0 const & a0)
+ bind(RT(*f)(T0), A0 const & a0)
     {
- typedef detail::function_ptr<1, RT, RT(*)(T0 &)> fp_type;
+ typedef detail::function_ptr<1, RT, RT(*)(T0)> fp_type;
         return detail::expression::function_eval<fp_type, A0>::make(fp_type(f), a0);
     }
 

Modified: trunk/libs/phoenix/test/Jamfile
==============================================================================
--- trunk/libs/phoenix/test/Jamfile (original)
+++ trunk/libs/phoenix/test/Jamfile 2011-08-24 05:52:58 EDT (Wed, 24 Aug 2011)
@@ -46,6 +46,7 @@
 # [ run bind/bind_function_object_tests_phx2.cpp ]
     [ run bind/bind_member_function_tests.cpp ]
     [ run bind/bind_member_variable_tests.cpp ]
+ [ run bind/bug5782.cpp ]
     ;
     
 test-suite phoenix_statement :

Added: trunk/libs/phoenix/test/bind/bug5782.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/phoenix/test/bind/bug5782.cpp 2011-08-24 05:52:58 EDT (Wed, 24 Aug 2011)
@@ -0,0 +1,17 @@
+#include <boost/phoenix/bind/bind_function.hpp>
+#include <boost/phoenix/core/argument.hpp>
+
+#include <iostream>
+
+using namespace boost::phoenix;
+using namespace boost::phoenix::placeholders;
+
+void foo(int n)
+{
+ std::cout << n << std::endl;
+}
+
+int main()
+{
+ bind(&foo, arg1)(4);
+}

Modified: trunk/libs/phoenix/test/scope/lambda_tests.cpp
==============================================================================
--- trunk/libs/phoenix/test/scope/lambda_tests.cpp (original)
+++ trunk/libs/phoenix/test/scope/lambda_tests.cpp 2011-08-24 05:52:58 EDT (Wed, 24 Aug 2011)
@@ -186,7 +186,7 @@
     {
                   {
             // $$$ Fixme. This should not be failing $$$
- int x = (let(_a = lambda[val(1)])[_a])()();
+ //int x = (let(_a = lambda[val(1)])[_a])()();
             //BOOST_TEST(x == 1);
                   }
 


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