forked from boostorg/unordered
Add copy constructors and assignment operators when using rvalue references. Fixes #5119.
[SVN r69469]
This commit is contained in:
@@ -154,6 +154,11 @@ namespace boost
|
||||
~unordered_set() {}
|
||||
|
||||
#if !defined(BOOST_NO_RVALUE_REFERENCES)
|
||||
unordered_set(unordered_set const& other)
|
||||
: table_(other.table_)
|
||||
{
|
||||
}
|
||||
|
||||
unordered_set(unordered_set&& other)
|
||||
: 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)
|
||||
{
|
||||
table_.move(x.table_);
|
||||
@@ -651,6 +662,11 @@ namespace boost
|
||||
~unordered_multiset() {}
|
||||
|
||||
#if !defined(BOOST_NO_RVALUE_REFERENCES)
|
||||
unordered_multiset(unordered_multiset const& other)
|
||||
: table_(other.table_)
|
||||
{
|
||||
}
|
||||
|
||||
unordered_multiset(unordered_multiset&& other)
|
||||
: 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)
|
||||
{
|
||||
table_.move(x.table_);
|
||||
|
||||
Reference in New Issue
Block a user