[Bug libstdc++/107189] Inconsistent range insertion implementations in std::_Rb_tree in <bits/stl_tree.h>

fdumont at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Oct 12 17:07:38 GMT 2022


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107189

François Dumont <fdumont at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2022-10-12
           Assignee|unassigned at gcc dot gnu.org      |fdumont at gcc dot gnu.org
     Ever confirmed|0                           |1
                 CC|                            |fdumont at gcc dot gnu.org
             Status|UNCONFIRMED                 |ASSIGNED

--- Comment #1 from François Dumont <fdumont at gcc dot gnu.org> ---
Code looks perfectly consistent to me. There is just this _Alloc_node
instantiation to remove.

Why do you want to call the _M_emplace_hint_{unique,equal} ? I rather wondered
why the __is_same_value_type alternatives are doing so just to pass end() as a
hint. And the answer is just that it is more convenient. Look at the
_M_insert_unique overloads to see that the one called is the most convenient
one.

Thanks for the report.


More information about the Gcc-bugs mailing list