https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108771
Bug ID: 108771 Summary: Incorrect noexcept for merging in <bits/stl_tree.h> Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: frankhb1989 at gmail dot com Target Milestone: --- _M_merge_unique and _M_merge_equal in _Rb_tree have noexcept. This is problematic because the call to _M_insert_node is potentially throwing, by the call to the comparison object. The subclause [associative.reqmts.general] also suggest it can throw: a.merge(a2) Throws: Nothing unless the comparison object throws. There is no such issue in _Hashtable.