@@ -1046,10 +1046,11 @@ public:
1046
1046
# endif
1047
1047
1048
1048
_LIBCPP_HIDE_FROM_ABI explicit unordered_map (const allocator_type& __a);
1049
- _LIBCPP_HIDE_FROM_ABI unordered_map (const unordered_map& __u);
1049
+ _LIBCPP_HIDE_FROM_ABI unordered_map (const unordered_map& __u) = default ;
1050
1050
_LIBCPP_HIDE_FROM_ABI unordered_map (const unordered_map& __u, const allocator_type& __a);
1051
1051
# ifndef _LIBCPP_CXX03_LANG
1052
- _LIBCPP_HIDE_FROM_ABI unordered_map (unordered_map&& __u) _NOEXCEPT_(is_nothrow_move_constructible<__table>::value);
1052
+ _LIBCPP_HIDE_FROM_ABI unordered_map (unordered_map&& __u)
1053
+ _NOEXCEPT_(is_nothrow_move_constructible<__table>::value) = default;
1053
1054
_LIBCPP_HIDE_FROM_ABI unordered_map (unordered_map&& __u, const allocator_type& __a);
1054
1055
_LIBCPP_HIDE_FROM_ABI unordered_map (initializer_list<value_type> __il);
1055
1056
_LIBCPP_HIDE_FROM_ABI
@@ -1099,24 +1100,10 @@ public:
1099
1100
static_assert (sizeof (std::__diagnose_unordered_container_requirements<_Key, _Hash, _Pred>(0 )), " " );
1100
1101
}
1101
1102
1102
- _LIBCPP_HIDE_FROM_ABI unordered_map& operator =(const unordered_map& __u) {
1103
- # ifndef _LIBCPP_CXX03_LANG
1104
- __table_ = __u.__table_ ;
1105
- # else
1106
- if (this != std::addressof (__u)) {
1107
- __table_.clear ();
1108
- __table_.hash_function () = __u.__table_ .hash_function ();
1109
- __table_.key_eq () = __u.__table_ .key_eq ();
1110
- __table_.max_load_factor () = __u.__table_ .max_load_factor ();
1111
- __table_.__copy_assign_alloc (__u.__table_ );
1112
- insert (__u.begin (), __u.end ());
1113
- }
1114
- # endif
1115
- return *this ;
1116
- }
1103
+ _LIBCPP_HIDE_FROM_ABI unordered_map& operator =(const unordered_map& __u) = default;
1117
1104
# ifndef _LIBCPP_CXX03_LANG
1118
1105
_LIBCPP_HIDE_FROM_ABI unordered_map& operator =(unordered_map&& __u)
1119
- _NOEXCEPT_ (is_nothrow_move_assignable<__table>::value);
1106
+ _NOEXCEPT_ (is_nothrow_move_assignable<__table>::value) = default ;
1120
1107
_LIBCPP_HIDE_FROM_ABI unordered_map& operator =(initializer_list<value_type> __il);
1121
1108
# endif // _LIBCPP_CXX03_LANG
1122
1109
@@ -1563,12 +1550,6 @@ unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map(
1563
1550
insert (__first, __last);
1564
1551
}
1565
1552
1566
- template <class _Key , class _Tp , class _Hash , class _Pred , class _Alloc >
1567
- unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map(const unordered_map& __u) : __table_(__u.__table_) {
1568
- __table_.__rehash_unique (__u.bucket_count ());
1569
- insert (__u.begin (), __u.end ());
1570
- }
1571
-
1572
1553
template <class _Key , class _Tp , class _Hash , class _Pred , class _Alloc >
1573
1554
unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map(const unordered_map& __u, const allocator_type& __a)
1574
1555
: __table_(__u.__table_, typename __table::allocator_type (__a)) {
@@ -1578,11 +1559,6 @@ unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map(const unordered_ma
1578
1559
1579
1560
# ifndef _LIBCPP_CXX03_LANG
1580
1561
1581
- template <class _Key , class _Tp , class _Hash , class _Pred , class _Alloc >
1582
- inline unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map(unordered_map&& __u)
1583
- _NOEXCEPT_ (is_nothrow_move_constructible<__table>::value)
1584
- : __table_(std::move(__u.__table_)) {}
1585
-
1586
1562
template <class _Key , class _Tp , class _Hash , class _Pred , class _Alloc >
1587
1563
unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map(unordered_map&& __u, const allocator_type& __a)
1588
1564
: __table_(std::move(__u.__table_), typename __table::allocator_type (__a)) {
@@ -1618,14 +1594,6 @@ unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map(
1618
1594
insert (__il.begin (), __il.end ());
1619
1595
}
1620
1596
1621
- template <class _Key , class _Tp , class _Hash , class _Pred , class _Alloc >
1622
- inline unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>&
1623
- unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::operator =(unordered_map&& __u)
1624
- _NOEXCEPT_ (is_nothrow_move_assignable<__table>::value) {
1625
- __table_ = std::move (__u.__table_ );
1626
- return *this ;
1627
- }
1628
-
1629
1597
template <class _Key , class _Tp , class _Hash , class _Pred , class _Alloc >
1630
1598
inline unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>&
1631
1599
unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::operator =(initializer_list<value_type> __il) {
@@ -1852,11 +1820,11 @@ public:
1852
1820
# endif
1853
1821
1854
1822
_LIBCPP_HIDE_FROM_ABI explicit unordered_multimap (const allocator_type& __a);
1855
- _LIBCPP_HIDE_FROM_ABI unordered_multimap (const unordered_multimap& __u);
1823
+ _LIBCPP_HIDE_FROM_ABI unordered_multimap (const unordered_multimap& __u) = default ;
1856
1824
_LIBCPP_HIDE_FROM_ABI unordered_multimap (const unordered_multimap& __u, const allocator_type& __a);
1857
1825
# ifndef _LIBCPP_CXX03_LANG
1858
1826
_LIBCPP_HIDE_FROM_ABI unordered_multimap (unordered_multimap&& __u)
1859
- _NOEXCEPT_(is_nothrow_move_constructible<__table>::value);
1827
+ _NOEXCEPT_(is_nothrow_move_constructible<__table>::value) = default ;
1860
1828
_LIBCPP_HIDE_FROM_ABI unordered_multimap (unordered_multimap&& __u, const allocator_type& __a);
1861
1829
_LIBCPP_HIDE_FROM_ABI unordered_multimap (initializer_list<value_type> __il);
1862
1830
_LIBCPP_HIDE_FROM_ABI unordered_multimap (
@@ -1923,7 +1891,7 @@ public:
1923
1891
}
1924
1892
# ifndef _LIBCPP_CXX03_LANG
1925
1893
_LIBCPP_HIDE_FROM_ABI unordered_multimap& operator =(unordered_multimap&& __u)
1926
- _NOEXCEPT_ (is_nothrow_move_assignable<__table>::value);
1894
+ _NOEXCEPT_ (is_nothrow_move_assignable<__table>::value) = default ;
1927
1895
_LIBCPP_HIDE_FROM_ABI unordered_multimap& operator =(initializer_list<value_type> __il);
1928
1896
# endif // _LIBCPP_CXX03_LANG
1929
1897
@@ -2315,13 +2283,6 @@ template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
2315
2283
inline unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_multimap(const allocator_type& __a)
2316
2284
: __table_(typename __table::allocator_type (__a)) {}
2317
2285
2318
- template <class _Key , class _Tp , class _Hash , class _Pred , class _Alloc >
2319
- unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_multimap(const unordered_multimap& __u)
2320
- : __table_(__u.__table_) {
2321
- __table_.__rehash_multi (__u.bucket_count ());
2322
- insert (__u.begin (), __u.end ());
2323
- }
2324
-
2325
2286
template <class _Key , class _Tp , class _Hash , class _Pred , class _Alloc >
2326
2287
unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_multimap(
2327
2288
const unordered_multimap& __u, const allocator_type& __a)
@@ -2332,11 +2293,6 @@ unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_multimap(
2332
2293
2333
2294
# ifndef _LIBCPP_CXX03_LANG
2334
2295
2335
- template <class _Key , class _Tp , class _Hash , class _Pred , class _Alloc >
2336
- inline unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_multimap(unordered_multimap&& __u)
2337
- _NOEXCEPT_ (is_nothrow_move_constructible<__table>::value)
2338
- : __table_(std::move(__u.__table_)) {}
2339
-
2340
2296
template <class _Key , class _Tp , class _Hash , class _Pred , class _Alloc >
2341
2297
unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_multimap(
2342
2298
unordered_multimap&& __u, const allocator_type& __a)
@@ -2373,14 +2329,6 @@ unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_multimap(
2373
2329
insert (__il.begin (), __il.end ());
2374
2330
}
2375
2331
2376
- template <class _Key , class _Tp , class _Hash , class _Pred , class _Alloc >
2377
- inline unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>&
2378
- unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>::operator =(unordered_multimap&& __u)
2379
- _NOEXCEPT_ (is_nothrow_move_assignable<__table>::value) {
2380
- __table_ = std::move (__u.__table_ );
2381
- return *this ;
2382
- }
2383
-
2384
2332
template <class _Key , class _Tp , class _Hash , class _Pred , class _Alloc >
2385
2333
inline unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>&
2386
2334
unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>::operator =(initializer_list<value_type> __il) {
0 commit comments