Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r53266 - branches/release/libs/lambda/test
From: steven_at_[hidden]
Date: 2009-05-25 20:59:17


Author: steven_watanabe
Date: 2009-05-25 20:59:17 EDT (Mon, 25 May 2009)
New Revision: 53266
URL: http://svn.boost.org/trac/boost/changeset/53266

Log:
Merge [53061] and [53233] from the trunk
Text files modified:
   branches/release/libs/lambda/test/bind_tests_advanced.cpp | 9 +++++----
   branches/release/libs/lambda/test/bind_tests_simple.cpp | 4 +---
   branches/release/libs/lambda/test/bind_tests_simple_f_refs.cpp | 4 +---
   branches/release/libs/lambda/test/constructor_tests.cpp | 24 ++++++++++++------------
   4 files changed, 19 insertions(+), 22 deletions(-)

Modified: branches/release/libs/lambda/test/bind_tests_advanced.cpp
==============================================================================
--- branches/release/libs/lambda/test/bind_tests_advanced.cpp (original)
+++ branches/release/libs/lambda/test/bind_tests_advanced.cpp 2009-05-25 20:59:17 EDT (Mon, 25 May 2009)
@@ -27,7 +27,8 @@
 #include <algorithm>
 
 
-using namespace boost::lambda;
+using namespace boost::lambda;
+namespace bl = boost::lambda;
 
 int sum_0() { return 0; }
 int sum_1(int a) { return a; }
@@ -91,7 +92,7 @@
   // This would result in;
   // bind(_1 + 1, _1)(make_const(100)) , which would be a compile time error
 
- return bind(unlambda(f), _1)(make_const(100));
+ return bl::bind(unlambda(f), _1)(make_const(100));
 
   // for other functors than lambda functors, unlambda has no effect
   // (except for making them const)
@@ -116,11 +117,11 @@
 
   BOOST_CHECK(call_with_101(_1 + 1) == 102);
 
- BOOST_CHECK(call_with_100(bind(std_functor(std::bind1st(std::plus<int>(), 1)), _1)) == 101);
+ BOOST_CHECK(call_with_100(bl::bind(std_functor(std::bind1st(std::plus<int>(), 1)), _1)) == 101);
 
   // std_functor insturcts LL that the functor defines a result_type typedef
   // rather than a sig template.
- bind(std_functor(std::plus<int>()), _1, _2)(i, i);
+ bl::bind(std_functor(std::plus<int>()), _1, _2)(i, i);
 }
 
 

Modified: branches/release/libs/lambda/test/bind_tests_simple.cpp
==============================================================================
--- branches/release/libs/lambda/test/bind_tests_simple.cpp (original)
+++ branches/release/libs/lambda/test/bind_tests_simple.cpp 2009-05-25 20:59:17 EDT (Mon, 25 May 2009)
@@ -18,9 +18,7 @@
 
 #include <iostream>
 
-
- using namespace std;
- using namespace boost::lambda;
+using namespace boost::lambda;
 
 
 int sum_of_args_0() { return 0; }

Modified: branches/release/libs/lambda/test/bind_tests_simple_f_refs.cpp
==============================================================================
--- branches/release/libs/lambda/test/bind_tests_simple_f_refs.cpp (original)
+++ branches/release/libs/lambda/test/bind_tests_simple_f_refs.cpp 2009-05-25 20:59:17 EDT (Mon, 25 May 2009)
@@ -18,9 +18,7 @@
 
 #include <iostream>
 
-
- using namespace std;
- using namespace boost::lambda;
+using namespace boost::lambda;
 
 
 int sum_of_args_0() { return 0; }

Modified: branches/release/libs/lambda/test/constructor_tests.cpp
==============================================================================
--- branches/release/libs/lambda/test/constructor_tests.cpp (original)
+++ branches/release/libs/lambda/test/constructor_tests.cpp 2009-05-25 20:59:17 EDT (Mon, 25 May 2009)
@@ -29,7 +29,7 @@
 #endif
 
 using namespace boost::lambda;
-using namespace std;
+namespace bl = boost::lambda;
 
 template<class T>
 bool check_tuple(int n, const T& t)
@@ -212,17 +212,17 @@
 void test_news_and_deletes ()
 {
   int* i[10];
- for_each(i, i+10, _1 = bind(new_ptr<int>(), 2));
+ std::for_each(i, i+10, _1 = bind(new_ptr<int>(), 2));
   int count_errors = 0;
 
- for_each(i, i+10, (*_1 == 2) || ++var(count_errors));
+ std::for_each(i, i+10, (*_1 == 2) || ++var(count_errors));
   BOOST_CHECK(count_errors == 0);
 
 
   count_deletes* ct[10];
- for_each(ct, ct+10, _1 = bind(new_ptr<count_deletes>()));
+ std::for_each(ct, ct+10, _1 = bind(new_ptr<count_deletes>()));
   count_deletes::count = 0;
- for_each(ct, ct+10, bind(delete_ptr(), _1));
+ std::for_each(ct, ct+10, bind(delete_ptr(), _1));
   BOOST_CHECK(count_deletes::count == 10);
    
 }
@@ -240,16 +240,16 @@
 
 void delayed_construction()
 {
- vector<int> x(3);
- vector<int> y(3);
+ std::vector<int> x(3);
+ std::vector<int> y(3);
 
- fill(x.begin(), x.end(), 0);
- fill(y.begin(), y.end(), 1);
+ std::fill(x.begin(), x.end(), 0);
+ std::fill(y.begin(), y.end(), 1);
   
- vector<pair<int, int> > v;
+ std::vector<std::pair<int, int> > v;
 
- transform(x.begin(), x.end(), y.begin(), back_inserter(v),
- bind(constructor<pair<int, int> >(), _1, _2) );
+ std::transform(x.begin(), x.end(), y.begin(), std::back_inserter(v),
+ bl::bind(constructor<std::pair<int, int> >(), _1, _2) );
 }
 
 int test_main(int, char *[]) {


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