[Bug c++/106810] Unexpected constraint recursion

2023-05-18 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106810

Andrew Pinski  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |DUPLICATE

--- Comment #2 from Andrew Pinski  ---
Even though this bug is older, PR 108393 has the full analysis of what is going
on and even talks about a fix for the testcase and talking about CWG2369 too.

*** This bug has been marked as a duplicate of bug 108393 ***

[Bug c++/106810] Unexpected constraint recursion

2023-05-18 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106810

--- Comment #1 from Andrew Pinski  ---
Reduced down just this:
```
template 
  concept t = requires(a aa, b bb) { aa == bb; };

template 
struct I {
  using value_type = int;
  using difference_type = int;

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

  template S>
  friend bool operator==(I, S);
};

static_assert(t>);
```

I think GCC is correct in saying this is recusive even.