@@ -689,9 +689,9 @@ public:
689
689
return std::__to_address (this ->__begin_ );
690
690
}
691
691
692
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void push_back (const_reference __x);
692
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void push_back (const_reference __x) { emplace_back (__x); }
693
693
694
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void push_back (value_type&& __x);
694
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void push_back (value_type&& __x) { emplace_back ( std::move (__x)); }
695
695
696
696
template <class ... _Args>
697
697
_LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
@@ -898,9 +898,6 @@ private:
898
898
__annotate_shrink (__old_size);
899
899
}
900
900
901
- template <class _Up >
902
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI inline pointer __push_back_slow_path (_Up&& __x);
903
-
904
901
template <class ... _Args>
905
902
_LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI inline pointer __emplace_back_slow_path (_Args&&... __args);
906
903
@@ -1491,44 +1488,6 @@ _LIBCPP_CONSTEXPR_SINCE_CXX20 void vector<_Tp, _Allocator>::shrink_to_fit() _NOE
1491
1488
}
1492
1489
}
1493
1490
1494
- template <class _Tp , class _Allocator >
1495
- template <class _Up >
1496
- _LIBCPP_CONSTEXPR_SINCE_CXX20 typename vector<_Tp, _Allocator>::pointer
1497
- vector<_Tp, _Allocator>::__push_back_slow_path (_Up&& __x) {
1498
- allocator_type& __a = this ->__alloc ();
1499
- __split_buffer<value_type, allocator_type&> __v (__recommend (size () + 1 ), size (), __a);
1500
- // __v.push_back(std::forward<_Up>(__x));
1501
- __alloc_traits::construct (__a, std::__to_address (__v.__end_ ), std::forward<_Up>(__x));
1502
- __v.__end_ ++;
1503
- __swap_out_circular_buffer (__v);
1504
- return this ->__end_ ;
1505
- }
1506
-
1507
- template <class _Tp , class _Allocator >
1508
- _LIBCPP_CONSTEXPR_SINCE_CXX20 inline _LIBCPP_HIDE_FROM_ABI void
1509
- vector<_Tp, _Allocator>::push_back (const_reference __x) {
1510
- pointer __end = this ->__end_ ;
1511
- if (__end < this ->__end_cap ()) {
1512
- __construct_one_at_end (__x);
1513
- ++__end;
1514
- } else {
1515
- __end = __push_back_slow_path (__x);
1516
- }
1517
- this ->__end_ = __end;
1518
- }
1519
-
1520
- template <class _Tp , class _Allocator >
1521
- _LIBCPP_CONSTEXPR_SINCE_CXX20 inline _LIBCPP_HIDE_FROM_ABI void vector<_Tp, _Allocator>::push_back (value_type&& __x) {
1522
- pointer __end = this ->__end_ ;
1523
- if (__end < this ->__end_cap ()) {
1524
- __construct_one_at_end (std::move (__x));
1525
- ++__end;
1526
- } else {
1527
- __end = __push_back_slow_path (std::move (__x));
1528
- }
1529
- this ->__end_ = __end;
1530
- }
1531
-
1532
1491
template <class _Tp , class _Allocator >
1533
1492
template <class ... _Args>
1534
1493
_LIBCPP_CONSTEXPR_SINCE_CXX20 typename vector<_Tp, _Allocator>::pointer
0 commit comments