@@ -972,31 +972,15 @@ public:
972
972
973
973
_LIBCPP_HIDE_FROM_ABI map (const map& __m) : __tree_(__m.__tree_) { insert (__m.begin (), __m.end ()); }
974
974
975
- _LIBCPP_HIDE_FROM_ABI map& operator =(const map& __m) {
976
- # ifndef _LIBCPP_CXX03_LANG
977
- __tree_ = __m.__tree_ ;
978
- # else
979
- if (this != std::addressof (__m)) {
980
- __tree_.clear ();
981
- __tree_.value_comp () = __m.__tree_ .value_comp ();
982
- __tree_.__copy_assign_alloc (__m.__tree_ );
983
- insert (__m.begin (), __m.end ());
984
- }
985
- # endif
986
- return *this ;
987
- }
975
+ _LIBCPP_HIDE_FROM_ABI map& operator =(const map& __m) = default ;
988
976
989
977
# ifndef _LIBCPP_CXX03_LANG
990
978
991
- _LIBCPP_HIDE_FROM_ABI map (map&& __m) noexcept (is_nothrow_move_constructible<__base>::value)
992
- : __tree_(std::move(__m.__tree_)) {}
979
+ _LIBCPP_HIDE_FROM_ABI map (map&& __m) noexcept (is_nothrow_move_constructible<__base>::value) = default;
993
980
994
981
_LIBCPP_HIDE_FROM_ABI map (map&& __m, const allocator_type& __a);
995
982
996
- _LIBCPP_HIDE_FROM_ABI map& operator =(map&& __m) noexcept (is_nothrow_move_assignable<__base>::value) {
997
- __tree_ = std::move (__m.__tree_ );
998
- return *this ;
999
- }
983
+ _LIBCPP_HIDE_FROM_ABI map& operator =(map&& __m) noexcept (is_nothrow_move_assignable<__base>::value) = default ;
1000
984
1001
985
_LIBCPP_HIDE_FROM_ABI map (initializer_list<value_type> __il, const key_compare& __comp = key_compare())
1002
986
: __tree_(__vc(__comp)) {
@@ -1659,31 +1643,16 @@ public:
1659
1643
insert (__m.begin (), __m.end ());
1660
1644
}
1661
1645
1662
- _LIBCPP_HIDE_FROM_ABI multimap& operator =(const multimap& __m) {
1663
- # ifndef _LIBCPP_CXX03_LANG
1664
- __tree_ = __m.__tree_ ;
1665
- # else
1666
- if (this != std::addressof (__m)) {
1667
- __tree_.clear ();
1668
- __tree_.value_comp () = __m.__tree_ .value_comp ();
1669
- __tree_.__copy_assign_alloc (__m.__tree_ );
1670
- insert (__m.begin (), __m.end ());
1671
- }
1672
- # endif
1673
- return *this ;
1674
- }
1646
+ _LIBCPP_HIDE_FROM_ABI multimap& operator =(const multimap& __m) = default ;
1675
1647
1676
1648
# ifndef _LIBCPP_CXX03_LANG
1677
1649
1678
- _LIBCPP_HIDE_FROM_ABI multimap (multimap&& __m) noexcept (is_nothrow_move_constructible<__base>::value)
1679
- : __tree_(std::move(__m.__tree_)) {}
1650
+ _LIBCPP_HIDE_FROM_ABI multimap (multimap&& __m) noexcept (is_nothrow_move_constructible<__base>::value) = default;
1680
1651
1681
1652
_LIBCPP_HIDE_FROM_ABI multimap (multimap&& __m, const allocator_type& __a);
1682
1653
1683
- _LIBCPP_HIDE_FROM_ABI multimap& operator =(multimap&& __m) noexcept (is_nothrow_move_assignable<__base>::value) {
1684
- __tree_ = std::move (__m.__tree_ );
1685
- return *this ;
1686
- }
1654
+ _LIBCPP_HIDE_FROM_ABI multimap&
1655
+ operator =(multimap&& __m) noexcept (is_nothrow_move_assignable<__base>::value) = default ;
1687
1656
1688
1657
_LIBCPP_HIDE_FROM_ABI multimap (initializer_list<value_type> __il, const key_compare& __comp = key_compare())
1689
1658
: __tree_(__vc(__comp)) {
0 commit comments