Boost logo

Boost-Commit :

From: danieljames_at_[hidden]
Date: 2007-05-19 16:04:15


Author: danieljames
Date: 2007-05-19 16:04:14 EDT (Sat, 19 May 2007)
New Revision: 4139
URL: http://svn.boost.org/trac/boost/changeset/4139

Log:

Text files modified:
   sandbox/unordered/libs/unordered/test/objects/minimal.hpp | 2 +-
   sandbox/unordered/libs/unordered/test/unordered/constructor_tests.cpp | 5 +++--
   sandbox/unordered/libs/unordered/test/unordered/erase_equiv_tests.cpp | 12 ++++++++----
   sandbox/unordered/libs/unordered/test/unordered/insert_tests.cpp | 5 +++--
   sandbox/unordered/libs/unordered/test/unordered/unnecessary_copy_tests.cpp | 8 ++++++++
   5 files changed, 23 insertions(+), 9 deletions(-)

Modified: sandbox/unordered/libs/unordered/test/objects/minimal.hpp
==============================================================================
--- sandbox/unordered/libs/unordered/test/objects/minimal.hpp (original)
+++ sandbox/unordered/libs/unordered/test/objects/minimal.hpp 2007-05-19 16:04:14 EDT (Sat, 19 May 2007)
@@ -79,7 +79,7 @@
 
         T* ptr_;
 
- ptr(T* ptr) : ptr_(ptr) {}
+ ptr(T* x) : ptr_(x) {}
     public:
         ptr() : ptr_(0) {}
 

Modified: sandbox/unordered/libs/unordered/test/unordered/constructor_tests.cpp
==============================================================================
--- sandbox/unordered/libs/unordered/test/unordered/constructor_tests.cpp (original)
+++ sandbox/unordered/libs/unordered/test/unordered/constructor_tests.cpp 2007-05-19 16:04:14 EDT (Sat, 19 May 2007)
@@ -244,9 +244,10 @@
 {
     std::cerr<<"map_constructor_test\n";
 
- typedef std::list<std::pair<typename T::key_type, typename T::mapped_type> > list;
+ typedef std::list<std::pair<BOOST_DEDUCED_TYPENAME T::key_type, BOOST_DEDUCED_TYPENAME T::mapped_type> > list;
     test::random_values<T> v(1000);
- list l(v.begin(), v.end());
+ list l;
+ std::copy(v.begin(), v.end(), std::back_inserter(l));
 
     T x(l.begin(), l.end());
 

Modified: sandbox/unordered/libs/unordered/test/unordered/erase_equiv_tests.cpp
==============================================================================
--- sandbox/unordered/libs/unordered/test/unordered/erase_equiv_tests.cpp (original)
+++ sandbox/unordered/libs/unordered/test/unordered/erase_equiv_tests.cpp 2007-05-19 16:04:14 EDT (Sat, 19 May 2007)
@@ -109,8 +109,10 @@
 template<class Range1, class Range2>
 bool compare(Range1 const& x, Range2 const& y)
 {
- list a(x.begin(), x.end());
- list b(y.begin(), y.end());
+ list a;
+ list b;
+ std::copy(x.begin(), x.end(), std::back_inserter(a));
+ std::copy(y.begin(), y.end(), std::back_inserter(b));
     a.sort();
     b.sort();
     return a == b;
@@ -119,7 +121,8 @@
 template <class Container>
 bool general_erase_range_test(Container& x, int start, int end)
 {
- list l(x.begin(), x.end());
+ list l;
+ std::copy(x.begin(), x.end(), std::back_inserter(l));
     l.erase(boost::next(l.begin(), start), boost::next(l.begin(), end));
     x.erase(boost::next(x.begin(), start), boost::next(x.begin(), end));
     return compare(l, x);
@@ -131,7 +134,8 @@
     for(std::size_t length = 0; length < x.size(); ++length) {
         for(std::size_t position = 0; position < x.size() - length; ++position) {
             Container y(x);
- list init(y.begin(), y.end());
+ list init;
+ std::copy(y.begin(), y.end(), std::back_inserter(init));
             if(!general_erase_range_test(y, position, position + length)) {
                 BOOST_ERROR("general_erase_range_test failed.");
                 std::cout<<"Erase: ["<<position<<","<<position + length<<")\n";

Modified: sandbox/unordered/libs/unordered/test/unordered/insert_tests.cpp
==============================================================================
--- sandbox/unordered/libs/unordered/test/unordered/insert_tests.cpp (original)
+++ sandbox/unordered/libs/unordered/test/unordered/insert_tests.cpp 2007-05-19 16:04:14 EDT (Sat, 19 May 2007)
@@ -247,9 +247,10 @@
 {
     std::cerr<<"associative_insert_range_test\n";
 
- typedef std::list<std::pair<typename X::key_type, typename X::mapped_type> > list;
+ typedef std::list<std::pair<BOOST_DEDUCED_TYPENAME X::key_type, BOOST_DEDUCED_TYPENAME X::mapped_type> > list;
     test::random_values<X> v(1000);
- list l(v.begin(), v.end());
+ list l;
+ std::copy(v.begin(), v.end(), std::back_inserter(l));
 
     X x; x.insert(l.begin(), l.end());
 

Modified: sandbox/unordered/libs/unordered/test/unordered/unnecessary_copy_tests.cpp
==============================================================================
--- sandbox/unordered/libs/unordered/test/unordered/unnecessary_copy_tests.cpp (original)
+++ sandbox/unordered/libs/unordered/test/unordered/unnecessary_copy_tests.cpp 2007-05-19 16:04:14 EDT (Sat, 19 May 2007)
@@ -16,10 +16,18 @@
     count_copies& operator=(count_copies const&);
 };
 
+#if defined(BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP)
+namespace boost {
+#endif
+
 std::size_t hash_value(count_copies const& x) {
     return 0;
 }
 
+#if defined(BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP)
+}
+#endif
+
 bool operator==(count_copies const& x, count_copies const& y) {
     return true;
 }


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