https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109751
Bug ID: 109751 Summary: boost interface_interface fails concept check starting in gcc-13 Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: ldalessandro at gmail dot com Target Milestone: --- The following example is reduced from https://github.com/boostorg/stl_interfaces/blob/boost-1.82.0/example/node_iterator.cpp. It compiles fine in gcc-12 but fails a concept check in gcc-13. #include <boost/stl_interfaces/iterator_interface.hpp> template<typename T> struct iterator : boost::stl_interfaces::iterator_interface<iterator<T>, std::forward_iterator_tag, T> { using base_type = boost::stl_interfaces::iterator_interface<iterator<T>, std::forward_iterator_tag, T>; using base_type::operator++; T& operator*() const; iterator& operator++(); bool operator==(iterator) const; }; static_assert(std::incrementable<iterator<int>>); Live: https://godbolt.org/z/6qsx1narj The error tells us that this requires clause changes from false to true. friend constexpr bool operator<(D lhs, D rhs) requires std::equality_comparable<D> { return (lhs - rhs) < typename D::difference_type(0); } https://github.com/boostorg/stl_interfaces/blob/boost-1.82.0/include/boost/stl_interfaces/iterator_interface.hpp#L779 I don't think that requires clause makes any sense, but I also don't know why the behavior would have changed from gcc-12 to gcc-13.