https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109751
--- Comment #8 from Luke Dalessandro <ldalessandro at gmail dot com> --- (In reply to Andrew Pinski from comment #7) > I think the error message is correct. > > In the original code we have: > ``` > ... > template<typename _Iter> > concept incrementable = regular<_Iter> && requires(_Iter __i) { { __i++ > } -> same_as<_Iter>; }; > ... > > namespace boost { namespace stl_interfaces { inline namespace v2 { > template< typename D, typename IteratorConcept, typename > DifferenceType> > struct iterator_interface > { > friend constexpr bool operator>=(D lhs, D rhs) > requires std::equality_comparable<D> { } > }; > ... > > template<typename T> > struct iterator : boost::stl_interfaces::iterator_interface<iterator<T>, > std::forward_iterator_tag, T> > { > bool operator==(iterator) const; > }; > > ``` > iterator<T> is not complete until after the instantiation is finished but we > have a std::equality_comparable which does the confusion Right. I was sort of surprised that that boost code could get away with a requires on any of those CRTP functions where it uses the CRTP "D" type, but I tested gcc-12 and all the clangs, and nvc++, and msvc 19, and gcc-13 was the only one reporting problems here, so I went with consensus.