public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/106810] New: Unexpected constraint recursion
@ 2022-09-02 6:37 hewillk at gmail dot com
2023-05-18 23:42 ` [Bug c++/106810] " pinskia at gcc dot gnu.org
2023-05-19 3:34 ` pinskia at gcc dot gnu.org
0 siblings, 2 replies; 3+ messages in thread
From: hewillk at gmail dot com @ 2022-09-02 6:37 UTC (permalink / raw)
To: gcc-bugs
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*>>);
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/106810] Unexpected constraint recursion
2022-09-02 6:37 [Bug c++/106810] New: Unexpected constraint recursion hewillk at gmail dot com
@ 2023-05-18 23:42 ` pinskia at gcc dot gnu.org
2023-05-19 3:34 ` pinskia at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-05-18 23:42 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106810
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Reduced down just this:
```
template <class a, class b>
concept t = requires(a aa, b bb) { aa == bb; };
template <class I2>
struct I {
using value_type = int;
using difference_type = int;
value_type& operator*() const;
I& operator++();
I operator++(int);
template<t<I2> S>
friend bool operator==(I, S);
};
static_assert(t<int*, I<int*>>);
```
I think GCC is correct in saying this is recusive even.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/106810] Unexpected constraint recursion
2022-09-02 6:37 [Bug c++/106810] New: Unexpected constraint recursion hewillk at gmail dot com
2023-05-18 23:42 ` [Bug c++/106810] " pinskia at gcc dot gnu.org
@ 2023-05-19 3:34 ` pinskia at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-05-19 3:34 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106810
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |DUPLICATE
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
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 ***
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-05-19 3:34 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-02 6:37 [Bug c++/106810] New: Unexpected constraint recursion hewillk at gmail dot com
2023-05-18 23:42 ` [Bug c++/106810] " pinskia at gcc dot gnu.org
2023-05-19 3:34 ` pinskia at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).