From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id C382F3858C83; Sun, 9 Oct 2022 04:39:19 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C382F3858C83 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1665290359; bh=JD+pv65panIosxaLanx2DkiFsvlwTLj7zNaTvqNZ71A=; h=From:To:Subject:Date:From; b=C4crOwzRe9tH1UR7UYFgaTCN1Mr0KR6v46KtEGrYKyt6nueMYb7fAfJP7OcSPdIkX C5bJYgHbO3oLDRpgH3umafZ9pqhjd2jrXbXOPDM0+u+iUuyqymSMylvYsQXuP8UMe5 HzCYw9GULdemYQqVIzSX+XxYaip6rzkSSyN3593w= From: "frankhb1989 at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/107189] New: Inconsistent range insertion implementations in std::_Rb_tree in Date: Sun, 09 Oct 2022 04:39:19 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libstdc++ X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: frankhb1989 at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D107189 Bug ID: 107189 Summary: Inconsistent range insertion implementations in std::_Rb_tree in 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: --- //#if __cplusplus >=3D 201103L template __enable_if_t<__same_value_type<_InputIterator>::value> _M_insert_range_unique(_InputIterator __first, _InputIterator __las= t) { _Alloc_node __an(*this); for (; __first !=3D __last; ++__first) _M_insert_unique_(end(), *__first, __an); } template __enable_if_t::value> _M_insert_range_unique(_InputIterator __first, _InputIterator __las= t) { for (; __first !=3D __last; ++__first) _M_emplace_unique(*__first); } template __enable_if_t<__same_value_type<_InputIterator>::value> _M_insert_range_equal(_InputIterator __first, _InputIterator __last) { _Alloc_node __an(*this); for (; __first !=3D __last; ++__first) _M_insert_equal_(end(), *__first, __an); } template __enable_if_t::value> _M_insert_range_equal(_InputIterator __first, _InputIterator __last) { _Alloc_node __an(*this); for (; __first !=3D __last; ++__first) _M_emplace_equal(*__first); } __an is not used in the 2nd overload of _M_insert_range_equal. And is there any reason about not using _M_emplace_hint_{unique,equal} for !__same_value_type cases?=