Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 2 additions & 8 deletions stl/inc/flat_map
Original file line number Diff line number Diff line change
Expand Up @@ -460,15 +460,10 @@ public:

template <_Usable_allocator_for<key_container_type, mapped_container_type> _Allocator>
_Flat_map_base(_Flat_map_base&& _Other, const _Allocator& _Alloc)
noexcept(is_nothrow_copy_constructible_v<key_compare> && is_nothrow_move_constructible_v<key_compare>
&& is_nothrow_move_constructible_v<key_container_type>
&& is_nothrow_move_constructible_v<mapped_container_type>)
: _Key_compare(_Other._Key_compare), _Data{_Other._Extract_using_allocator(_Alloc)} {}

// Assignment
_Flat_map_base& operator=(const _Flat_map_base& _Other)
noexcept(is_nothrow_copy_assignable_v<key_compare> && is_nothrow_copy_assignable_v<key_container_type>
&& is_nothrow_copy_assignable_v<mapped_container_type>) {
_Flat_map_base& operator=(const _Flat_map_base& _Other) {
_Clear_guard _Guard{this};
_Key_compare = _Other._Key_compare;
_Data = _Other._Data;
Expand Down Expand Up @@ -647,8 +642,7 @@ public:
}

template <class _Allocator>
containers _Extract_using_allocator(const _Allocator& _Alloc) noexcept(
is_nothrow_move_constructible_v<key_container_type> && is_nothrow_move_constructible_v<mapped_container_type>) {
containers _Extract_using_allocator(const _Allocator& _Alloc) {
_Clear_guard _Guard{this};
return containers{.keys = _STD make_obj_using_allocator<key_container_type>(_Alloc, _STD move(_Data.keys)),
.values = _STD make_obj_using_allocator<mapped_container_type>(_Alloc, _STD move(_Data.values))};
Expand Down