From 5a33687da07cb8ffc68ef5065ed46bab5c4d6555 Mon Sep 17 00:00:00 2001 From: Howard Hinnant Date: Fri, 1 Jul 2011 19:24:36 +0000 Subject: Correct for new rules regarding implicitly deleted special members. http://llvm.org/bugs/show_bug.cgi?id=10191 llvm-svn: 134248 --- libcxx/include/unordered_map | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'libcxx/include/unordered_map') diff --git a/libcxx/include/unordered_map b/libcxx/include/unordered_map index 394be32dfe7..e1381f7614d 100644 --- a/libcxx/include/unordered_map +++ b/libcxx/include/unordered_map @@ -691,7 +691,12 @@ public: const hasher& __hf, const key_equal& __eql, const allocator_type& __a); // ~unordered_map() = default; - // unordered_map& operator=(const unordered_map& __u) = default; + _LIBCPP_INLINE_VISIBILITY + unordered_map& operator=(const unordered_map& __u) + { + __table_ = __u.__table_; + return *this; + } #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES unordered_map& operator=(unordered_map&& __u) _NOEXCEPT_(is_nothrow_move_assignable<__table>::value); @@ -1295,7 +1300,12 @@ public: const hasher& __hf, const key_equal& __eql, const allocator_type& __a); // ~unordered_multimap() = default; - // unordered_multimap& operator=(const unordered_multimap& __u) = default; + _LIBCPP_INLINE_VISIBILITY + unordered_multimap& operator=(const unordered_multimap& __u) + { + __table_ = __u.__table_; + return *this; + } #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES unordered_multimap& operator=(unordered_multimap&& __u) _NOEXCEPT_(is_nothrow_move_assignable<__table>::value); -- cgit v1.2.3