https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119415
--- Comment #13 from 康桓瑋 <hewillk at gmail dot com> --- (In reply to Tomasz Kamiński from comment #12) > I have realized that with the resolution of the > https://cplusplus.github.io/LWG/lwg-defects.html#3749, you can run into this > problem by doing: > > auto r = std::views::iota(__int128(0)) | std::views::take(5) | > std::views::common; > s.insert_range(r); > > The GCC does not yet implement this issue > (https://gcc.gnu.org/wiki/LibstdcxxTodo), but checking for > iterator_traits<It>::iterator_category being derived from input_iterator_tag > as you suggested will avoid the issue. I thought about that. But it won't. Because cpp17-input-iterator requires signed_integral<typename incrementable_traits<I>::difference_type>, we are not going to this branch even if LWG is implemented.