Correct for new rules regarding implicitly deleted special members. http://llvm.org/bugs/show_bug.cgi?id=10191

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@134248 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Howard Hinnant
2011-07-01 19:24:36 +00:00
parent 0949eedbd6
commit 61aa6013c3
8 changed files with 242 additions and 10 deletions

View File

@@ -373,7 +373,12 @@ public:
const hasher& __hf, const key_equal& __eql,
const allocator_type& __a);
// ~unordered_set() = default;
// unordered_set& operator=(const unordered_set& __u) = default;
_LIBCPP_INLINE_VISIBILITY
unordered_set& operator=(const unordered_set& __u)
{
__table_ = __u.__table_;
return *this;
}
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
unordered_set& operator=(unordered_set&& __u)
_NOEXCEPT_(is_nothrow_move_assignable<__table>::value);
@@ -766,7 +771,12 @@ public:
const hasher& __hf, const key_equal& __eql,
const allocator_type& __a);
// ~unordered_multiset() = default;
// unordered_multiset& operator=(const unordered_multiset& __u) = default;
_LIBCPP_INLINE_VISIBILITY
unordered_multiset& operator=(const unordered_multiset& __u)
{
__table_ = __u.__table_;
return *this;
}
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
unordered_multiset& operator=(unordered_multiset&& __u)
_NOEXCEPT_(is_nothrow_move_assignable<__table>::value);