https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106810

            Bug ID: 106810
           Summary: Unexpected constraint recursion
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: hewillk at gmail dot com
  Target Milestone: ---

GCC will produce recursive constraints check for the following code, suggesting
that there may be a language bug (or maybe not a bug).

https://godbolt.org/z/vYd7a5f19

#include <iterator>

template <class I2>
struct I {
  using value_type = int;
  using difference_type = int;

  value_type& operator*() const;
  I& operator++();
  I operator++(int);

  template<std::sentinel_for<I2> S>
  friend bool operator==(I, S);
};

static_assert(std::sentinel_for<int*, I<int*>>);

Reply via email to