|
Boost-Commit : |
From: daniel_james_at_[hidden]
Date: 2008-06-15 13:03:38
Author: danieljames
Date: 2008-06-15 13:03:37 EDT (Sun, 15 Jun 2008)
New Revision: 46410
URL: http://svn.boost.org/trac/boost/changeset/46410
Log:
Fix in an error in the unordered containers' emulated move constructors. These
aren't actually used, so I could probalby just remove 'move_from' for now (it's
used in the full move library).
Text files modified:
trunk/boost/unordered_map.hpp | 4 ++--
trunk/boost/unordered_set.hpp | 4 ++--
trunk/libs/unordered/test/unordered/compile_map.cpp | 15 +++++++++++++++
trunk/libs/unordered/test/unordered/compile_set.cpp | 13 +++++++++++++
4 files changed, 32 insertions(+), 4 deletions(-)
Modified: trunk/boost/unordered_map.hpp
==============================================================================
--- trunk/boost/unordered_map.hpp (original)
+++ trunk/boost/unordered_map.hpp 2008-06-15 13:03:37 EDT (Sun, 15 Jun 2008)
@@ -122,7 +122,7 @@
}
#else
unordered_map(boost::unordered_detail::move_from<unordered_map<Key, T, Hash, Pred, Alloc> > other)
- : base(other.base, boost::unordered_detail::move_tag())
+ : base(other.source.base, boost::unordered_detail::move_tag())
{
}
@@ -507,7 +507,7 @@
}
#else
unordered_multimap(boost::unordered_detail::move_from<unordered_multimap<Key, T, Hash, Pred, Alloc> > other)
- : base(other.base, boost::unordered_detail::move_tag())
+ : base(other.source.base, boost::unordered_detail::move_tag())
{
}
Modified: trunk/boost/unordered_set.hpp
==============================================================================
--- trunk/boost/unordered_set.hpp (original)
+++ trunk/boost/unordered_set.hpp 2008-06-15 13:03:37 EDT (Sun, 15 Jun 2008)
@@ -119,7 +119,7 @@
}
#else
unordered_set(boost::unordered_detail::move_from<unordered_set<Value, Hash, Pred, Alloc> > other)
- : base(other.base, boost::unordered_detail::move_tag())
+ : base(other.source.base, boost::unordered_detail::move_tag())
{
}
@@ -476,7 +476,7 @@
}
#else
unordered_multiset(boost::unordered_detail::move_from<unordered_multiset<Value, Hash, Pred, Alloc> > other)
- : base(other.base, boost::unordered_detail::move_tag())
+ : base(other.source.base, boost::unordered_detail::move_tag())
{
}
Modified: trunk/libs/unordered/test/unordered/compile_map.cpp
==============================================================================
--- trunk/libs/unordered/test/unordered/compile_map.cpp (original)
+++ trunk/libs/unordered/test/unordered/compile_map.cpp 2008-06-15 13:03:37 EDT (Sun, 15 Jun 2008)
@@ -13,6 +13,21 @@
#include "../objects/minimal.hpp"
#include "./compile_tests.hpp"
+// Explicit instantiation to catch compile-time errors
+
+template class boost::unordered_map<
+ test::minimal::assignable,
+ test::minimal::default_copy_constructible,
+ test::minimal::hash<test::minimal::assignable>,
+ test::minimal::equal_to<test::minimal::assignable>,
+ test::minimal::allocator<test::minimal::assignable> >;
+template class boost::unordered_multimap<
+ test::minimal::assignable,
+ test::minimal::copy_constructible,
+ test::minimal::hash<test::minimal::assignable>,
+ test::minimal::equal_to<test::minimal::assignable>,
+ test::minimal::allocator<test::minimal::assignable> >;
+
UNORDERED_AUTO_TEST(test0)
{
typedef std::pair<test::minimal::assignable const,
Modified: trunk/libs/unordered/test/unordered/compile_set.cpp
==============================================================================
--- trunk/libs/unordered/test/unordered/compile_set.cpp (original)
+++ trunk/libs/unordered/test/unordered/compile_set.cpp 2008-06-15 13:03:37 EDT (Sun, 15 Jun 2008)
@@ -13,6 +13,19 @@
#include "../objects/minimal.hpp"
#include "./compile_tests.hpp"
+// Explicit instantiation to catch compile-time errors
+
+template class boost::unordered_set<
+ test::minimal::assignable,
+ test::minimal::hash<test::minimal::assignable>,
+ test::minimal::equal_to<test::minimal::assignable>,
+ test::minimal::allocator<test::minimal::assignable> >;
+template class boost::unordered_multiset<
+ test::minimal::assignable,
+ test::minimal::hash<test::minimal::assignable>,
+ test::minimal::equal_to<test::minimal::assignable>,
+ test::minimal::allocator<test::minimal::assignable> >;
+
UNORDERED_AUTO_TEST(test0)
{
test::minimal::assignable assignable = test::minimal::assignable::create();
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