https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95457
Arsen Arsenović <arsen at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever confirmed|0 |1
Last reconfirmed| |2024-07-23
Severity|normal |enhancement
--- Comment #2 from Arsen Arsenović <arsen at gcc dot gnu.org> ---
generalized version of this issue:
#include <coroutine>
template<int>
struct X {};
template<int R>
requires (R >= 0)
struct X<R>
{ using test_type = int; };
typename X<0>::test_type foo = 1;
typename X<-1>::test_type bar = 1;
.. resulting in:
<source>:11:17: error: 'test_type' in 'struct X<-1>' does not name a type
11 | typename X<-1>::test_type bar = 1;
| ^~~~~~~~~
I think that if diagnostics were created for this example, we could piggy-back
off the machinery nicely for coroutines