mirror of
https://github.com/boostorg/unordered.git
synced 2025-07-30 11:27:15 +02:00
Add copy constructors and assignment operators when using rvalue references. Refs #5119.
[SVN r68445]
This commit is contained in:
@ -160,6 +160,11 @@ namespace boost
|
|||||||
~unordered_map() {}
|
~unordered_map() {}
|
||||||
|
|
||||||
#if !defined(BOOST_NO_RVALUE_REFERENCES)
|
#if !defined(BOOST_NO_RVALUE_REFERENCES)
|
||||||
|
unordered_map(unordered_map const& other)
|
||||||
|
: table_(other.table_)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
unordered_map(unordered_map&& other)
|
unordered_map(unordered_map&& other)
|
||||||
: table_(other.table_, boost::unordered_detail::move_tag())
|
: table_(other.table_, boost::unordered_detail::move_tag())
|
||||||
{
|
{
|
||||||
@ -170,6 +175,12 @@ namespace boost
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
unordered_map& operator=(unordered_map const& x)
|
||||||
|
{
|
||||||
|
table_ = x.table_;
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
unordered_map& operator=(unordered_map&& x)
|
unordered_map& operator=(unordered_map&& x)
|
||||||
{
|
{
|
||||||
table_.move(x.table_);
|
table_.move(x.table_);
|
||||||
@ -705,6 +716,11 @@ namespace boost
|
|||||||
~unordered_multimap() {}
|
~unordered_multimap() {}
|
||||||
|
|
||||||
#if !defined(BOOST_NO_RVALUE_REFERENCES)
|
#if !defined(BOOST_NO_RVALUE_REFERENCES)
|
||||||
|
unordered_multimap(unordered_multimap const& other)
|
||||||
|
: table_(other.table_)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
unordered_multimap(unordered_multimap&& other)
|
unordered_multimap(unordered_multimap&& other)
|
||||||
: table_(other.table_, boost::unordered_detail::move_tag())
|
: table_(other.table_, boost::unordered_detail::move_tag())
|
||||||
{
|
{
|
||||||
@ -715,6 +731,12 @@ namespace boost
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
unordered_multimap& operator=(unordered_multimap const& x)
|
||||||
|
{
|
||||||
|
table_ = x.table_;
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
unordered_multimap& operator=(unordered_multimap&& x)
|
unordered_multimap& operator=(unordered_multimap&& x)
|
||||||
{
|
{
|
||||||
table_.move(x.table_);
|
table_.move(x.table_);
|
||||||
|
@ -154,6 +154,11 @@ namespace boost
|
|||||||
~unordered_set() {}
|
~unordered_set() {}
|
||||||
|
|
||||||
#if !defined(BOOST_NO_RVALUE_REFERENCES)
|
#if !defined(BOOST_NO_RVALUE_REFERENCES)
|
||||||
|
unordered_set(unordered_set const& other)
|
||||||
|
: table_(other.table_)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
unordered_set(unordered_set&& other)
|
unordered_set(unordered_set&& other)
|
||||||
: table_(other.table_, boost::unordered_detail::move_tag())
|
: table_(other.table_, boost::unordered_detail::move_tag())
|
||||||
{
|
{
|
||||||
@ -164,6 +169,12 @@ namespace boost
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
unordered_set& operator=(unordered_set const& x)
|
||||||
|
{
|
||||||
|
table_ = x.table_;
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
unordered_set& operator=(unordered_set&& x)
|
unordered_set& operator=(unordered_set&& x)
|
||||||
{
|
{
|
||||||
table_.move(x.table_);
|
table_.move(x.table_);
|
||||||
@ -651,6 +662,11 @@ namespace boost
|
|||||||
~unordered_multiset() {}
|
~unordered_multiset() {}
|
||||||
|
|
||||||
#if !defined(BOOST_NO_RVALUE_REFERENCES)
|
#if !defined(BOOST_NO_RVALUE_REFERENCES)
|
||||||
|
unordered_multiset(unordered_multiset const& other)
|
||||||
|
: table_(other.table_)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
unordered_multiset(unordered_multiset&& other)
|
unordered_multiset(unordered_multiset&& other)
|
||||||
: table_(other.table_, boost::unordered_detail::move_tag())
|
: table_(other.table_, boost::unordered_detail::move_tag())
|
||||||
{
|
{
|
||||||
@ -661,6 +677,12 @@ namespace boost
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
unordered_multiset& operator=(unordered_multiset const& x)
|
||||||
|
{
|
||||||
|
table_ = x.table_;
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
unordered_multiset& operator=(unordered_multiset&& x)
|
unordered_multiset& operator=(unordered_multiset&& x)
|
||||||
{
|
{
|
||||||
table_.move(x.table_);
|
table_.move(x.table_);
|
||||||
|
Reference in New Issue
Block a user