https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119415
--- Comment #18 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Tomasz Kaminski <tkami...@gcc.gnu.org>: https://gcc.gnu.org/g:272d26d519f5abcca71f5b1d5acc07319e480ba3 commit r15-8925-g272d26d519f5abcca71f5b1d5acc07319e480ba3 Author: Tomasz KamiÅski <tkami...@redhat.com> Date: Wed Mar 26 07:34:37 2025 +0100 libstdc++: Check presence of iterator_category for flat_sets insert_range [PR119415] As pointed out by Hewill Kang (reporter) in the issue, checking if iterator of the incoming range satisfies __cpp17_input_iterator, may still lead to hard errors inside of insert_range for iterators that satisfies that concept, but specialize iterator_traits without iterator_category typedef (std::common_iterator specialize iterator_traits without iterator_category in some cases). To address that we instead check if the iterator_traits<It>::iterator_category is present and denote at least input_iterator_tag, using existing __has_input_iter_cat. PR libstdc++/119415 libstdc++-v3/ChangeLog: * include/std/flat_set (_Flat_set_impl:insert_range): Replace __detail::__cpp17_input_iterator with __has_input_iter_cat. * testsuite/23_containers/flat_multiset/1.cc: New tests * testsuite/23_containers/flat_set/1.cc: New tests Reviewed-by: Jonathan Wakely <jwak...@redhat.com> Signed-off-by: Tomasz KamiÅski <tkami...@redhat.com>