From 651dffb4227eedaa478b17e635572a0d98a7c91c Mon Sep 17 00:00:00 2001 From: Alex Guteniev Date: Fri, 2 May 2025 08:34:51 +0300 Subject: [PATCH] ``: drop bogus exception specifications Remove these exception specifications: * move-with-allocator constructor throws because allocator throws * ditto the extracted machinery _Extract_using_allocator * ditto copy assignment Bugs introduced in #5454, before that there was only one of them, and it was in a constructor that was never called. --- stl/inc/flat_map | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/stl/inc/flat_map b/stl/inc/flat_map index 33f9e6f1567..03a3033bcea 100644 --- a/stl/inc/flat_map +++ b/stl/inc/flat_map @@ -460,15 +460,10 @@ public: template <_Usable_allocator_for _Allocator> _Flat_map_base(_Flat_map_base&& _Other, const _Allocator& _Alloc) - noexcept(is_nothrow_copy_constructible_v && is_nothrow_move_constructible_v - && is_nothrow_move_constructible_v - && is_nothrow_move_constructible_v) : _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 && is_nothrow_copy_assignable_v - && is_nothrow_copy_assignable_v) { + _Flat_map_base& operator=(const _Flat_map_base& _Other) { _Clear_guard _Guard{this}; _Key_compare = _Other._Key_compare; _Data = _Other._Data; @@ -647,8 +642,7 @@ public: } template - containers _Extract_using_allocator(const _Allocator& _Alloc) noexcept( - is_nothrow_move_constructible_v && is_nothrow_move_constructible_v) { + containers _Extract_using_allocator(const _Allocator& _Alloc) { _Clear_guard _Guard{this}; return containers{.keys = _STD make_obj_using_allocator(_Alloc, _STD move(_Data.keys)), .values = _STD make_obj_using_allocator(_Alloc, _STD move(_Data.values))};