https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109022
Jonathan Wakely <redi at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2023-03-06 Ever confirmed|0 |1 --- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> --- For any type except the container's own type we don't use any hint for insertion, and so it makes no difference whether the input is sorted or not: template<typename _InputIterator> __enable_if_t<__same_value_type<_InputIterator>::value> _M_insert_range_unique(_InputIterator __first, _InputIterator __last) { _Alloc_node __an(*this); for (; __first != __last; ++__first) _M_insert_unique_(end(), *__first, __an); } template<typename _InputIterator> __enable_if_t<!__same_value_type<_InputIterator>::value> _M_insert_range_unique(_InputIterator __first, _InputIterator __last) { for (; __first != __last; ++__first) _M_emplace_unique(*__first); }