Update of /cvsroot/boost-sandbox/boost-sandbox/libs/unordered/test/objects
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv32539/libs/unordered/test/objects
Modified Files:
exception.hpp fwd.hpp minimal.hpp test.hpp
Log Message:
Import latest changes to the unordered containers. Includes:
Copyright update.
Switch back to the version where the sentinel points to itself.
Remove alternative versions of swap.
Workaround a borland bug or two.
More consistent use of class/swap/template.
Avoid a few warnings.
Add a no-throw swap to the allocator for exception testing.
Index: exception.hpp
===================================================================
RCS file: /cvsroot/boost-sandbox/boost-sandbox/libs/unordered/test/objects/exception.hpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- exception.hpp 3 Dec 2006 23:08:17 -0000 1.4
+++ exception.hpp 18 Mar 2007 20:00:59 -0000 1.5
@@ -1,5 +1,5 @@
-// Copyright 2006 Daniel James.
+// Copyright 2006-2007 Daniel James.
// 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)
@@ -661,6 +661,11 @@
}
return (std::numeric_limits<std::size_t>::max)();
}
+
+ friend void swap(allocator<T>& x, allocator<T>& y)
+ {
+ std::swap(x.tag_, y.tag_);
+ }
};
// It's pretty much impossible to write a compliant swap when these
Index: fwd.hpp
===================================================================
RCS file: /cvsroot/boost-sandbox/boost-sandbox/libs/unordered/test/objects/fwd.hpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- fwd.hpp 1 Jul 2006 22:31:26 -0000 1.3
+++ fwd.hpp 18 Mar 2007 20:00:59 -0000 1.4
@@ -1,5 +1,5 @@
-// Copyright 2006 Daniel James.
+// Copyright 2006-2007 Daniel James.
// 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)
Index: minimal.hpp
===================================================================
RCS file: /cvsroot/boost-sandbox/boost-sandbox/libs/unordered/test/objects/minimal.hpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- minimal.hpp 31 Oct 2006 22:19:26 -0000 1.5
+++ minimal.hpp 18 Mar 2007 20:00:59 -0000 1.6
@@ -1,5 +1,5 @@
-// Copyright 2006 Daniel James.
+// Copyright 2006-2007 Daniel James.
// 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)
@@ -46,7 +46,7 @@
class hash
{
public:
- static hash create() { return hash(); }
+ static hash create() { return hash<T>(); }
hash() {}
hash(hash const&) {}
hash& operator=(hash const&) { return *this; }
@@ -59,13 +59,13 @@
class equal_to
{
public:
- static equal_to create() { return equal_to(); }
+ static equal_to create() { return equal_to<T>(); }
equal_to() {}
equal_to(equal_to const&) {}
equal_to& operator=(equal_to const&) { return *this; }
~equal_to() {}
- bool operator()(T const& x, T const& y) const { return true; }
+ bool operator()(T const&, T const&) const { return true; }
};
template <class T> class pointer;
@@ -90,7 +90,7 @@
T* operator->() const { return ptr_; }
pointer& operator++() { ++ptr_; return *this; }
pointer operator++(int) { pointer tmp(*this); ++ptr_; return tmp; }
- pointer operator+(int s) const { return pointer(ptr_ + s); }
+ pointer operator+(int s) const { return pointer<T>(ptr_ + s); }
T& operator[](int s) const { return ptr_[s]; }
bool operator!() const { return !ptr_; }
Index: test.hpp
===================================================================
RCS file: /cvsroot/boost-sandbox/boost-sandbox/libs/unordered/test/objects/test.hpp,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- test.hpp 3 Dec 2006 23:08:17 -0000 1.8
+++ test.hpp 18 Mar 2007 20:00:59 -0000 1.9
@@ -1,5 +1,5 @@
-// Copyright 2006 Daniel James.
+// Copyright 2006-2007 Daniel James.
// 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)
|