Unordered: Try to fix issues with moving non-class types.

[SVN r74193]
This commit is contained in:
Daniel James
2011-09-02 08:28:52 +00:00
parent a3ffd4a7c9
commit 965e25c989
6 changed files with 68 additions and 44 deletions

View File

@@ -132,9 +132,7 @@ namespace unordered
unordered_map(unordered_map const&);
#if BOOST_UNORDERED_USE_RV_REF
unordered_map& operator=(
BOOST_RV_REF(unordered_map) x)
unordered_map& operator=(BOOST_RV_REF(unordered_map) x)
{
table_.move_assign(x.table_);
return *this;
@@ -144,7 +142,6 @@ namespace unordered
: table_(other.table_, ::boost::unordered::detail::move_tag())
{
}
#endif
#if !defined(BOOST_NO_RVALUE_REFERENCES)
unordered_map(unordered_map&&, allocator_type const&);
@@ -257,11 +254,10 @@ namespace unordered
#endif
std::pair<iterator, bool> insert(value_type const&);
iterator insert(const_iterator, value_type const&);
#if BOOST_UNORDERED_USE_RV_REF
std::pair<iterator, bool> insert(BOOST_RV_REF(value_type));
iterator insert(const_iterator, value_type const&);
iterator insert(const_iterator, BOOST_RV_REF(value_type));
#endif
template <class InputIt> void insert(InputIt, InputIt);
#if !defined(BOOST_NO_0X_HDR_INITIALIZER_LIST)
@@ -481,9 +477,7 @@ namespace unordered
unordered_multimap(unordered_multimap const&);
#if BOOST_UNORDERED_USE_RV_REF
unordered_multimap& operator=(
BOOST_RV_REF(unordered_multimap) x)
unordered_multimap& operator=(BOOST_RV_REF(unordered_multimap) x)
{
table_.move_assign(x.table_);
return *this;
@@ -493,7 +487,6 @@ namespace unordered
: table_(other.table_, ::boost::unordered::detail::move_tag())
{
}
#endif
#if !defined(BOOST_NO_RVALUE_REFERENCES)
unordered_multimap(unordered_multimap&&, allocator_type const&);
@@ -606,11 +599,10 @@ namespace unordered
#endif
iterator insert(value_type const&);
iterator insert(const_iterator, value_type const&);
#if BOOST_UNORDERED_USE_RV_REF
iterator insert(BOOST_RV_REF(value_type));
iterator insert(const_iterator, value_type const&);
iterator insert(const_iterator, BOOST_RV_REF(value_type));
#endif
template <class InputIt> void insert(InputIt, InputIt);
#if !defined(BOOST_NO_0X_HDR_INITIALIZER_LIST)
@@ -930,7 +922,6 @@ namespace unordered
return iterator(table_.emplace(obj).first);
}
#if BOOST_UNORDERED_USE_RV_REF
template <class K, class T, class H, class P, class A>
std::pair<typename unordered_map<K,T,H,P,A>::iterator, bool>
unordered_map<K,T,H,P,A>::insert(BOOST_RV_REF(value_type) obj)
@@ -945,7 +936,6 @@ namespace unordered
{
return iterator(table_.emplace(boost::move(obj)).first);
}
#endif
template <class K, class T, class H, class P, class A>
template <class InputIt>
@@ -1363,7 +1353,6 @@ namespace unordered
return iterator(table_.emplace(obj));
}
#if BOOST_UNORDERED_USE_RV_REF
template <class K, class T, class H, class P, class A>
typename unordered_multimap<K,T,H,P,A>::iterator
unordered_multimap<K,T,H,P,A>::insert(BOOST_RV_REF(value_type) obj)
@@ -1378,7 +1367,6 @@ namespace unordered
{
return iterator(table_.emplace(boost::move(obj)));
}
#endif
template <class K, class T, class H, class P, class A>
template <class InputIt>