diff --git a/include/boost/unordered_map.hpp b/include/boost/unordered_map.hpp index c172881f..bd6cfb2f 100644 --- a/include/boost/unordered_map.hpp +++ b/include/boost/unordered_map.hpp @@ -122,7 +122,7 @@ namespace boost } #else unordered_map(boost::unordered_detail::move_from > other) - : base(other.base, boost::unordered_detail::move_tag()) + : base(other.source.base, boost::unordered_detail::move_tag()) { } @@ -507,7 +507,7 @@ namespace boost } #else unordered_multimap(boost::unordered_detail::move_from > other) - : base(other.base, boost::unordered_detail::move_tag()) + : base(other.source.base, boost::unordered_detail::move_tag()) { } diff --git a/include/boost/unordered_set.hpp b/include/boost/unordered_set.hpp index 5acdf55b..61922f85 100644 --- a/include/boost/unordered_set.hpp +++ b/include/boost/unordered_set.hpp @@ -119,7 +119,7 @@ namespace boost } #else unordered_set(boost::unordered_detail::move_from > other) - : base(other.base, boost::unordered_detail::move_tag()) + : base(other.source.base, boost::unordered_detail::move_tag()) { } @@ -476,7 +476,7 @@ namespace boost } #else unordered_multiset(boost::unordered_detail::move_from > other) - : base(other.base, boost::unordered_detail::move_tag()) + : base(other.source.base, boost::unordered_detail::move_tag()) { } diff --git a/test/unordered/compile_map.cpp b/test/unordered/compile_map.cpp index 9e12d4c4..0e870fc6 100644 --- a/test/unordered/compile_map.cpp +++ b/test/unordered/compile_map.cpp @@ -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::equal_to, + test::minimal::allocator >; +template class boost::unordered_multimap< + test::minimal::assignable, + test::minimal::copy_constructible, + test::minimal::hash, + test::minimal::equal_to, + test::minimal::allocator >; + UNORDERED_AUTO_TEST(test0) { typedef std::pair, + test::minimal::equal_to, + test::minimal::allocator >; +template class boost::unordered_multiset< + test::minimal::assignable, + test::minimal::hash, + test::minimal::equal_to, + test::minimal::allocator >; + UNORDERED_AUTO_TEST(test0) { test::minimal::assignable assignable = test::minimal::assignable::create();