john-brawn-arm wrote:
I'm not completely sure if we should be giving an error for the example I gave
above. Looking through the C++20 standard I see temp.res paragraph 2:
> A name used in a template declaration or definition and that is dependent on
> a template-parameter is assumed
not to name a type unless the applicable name lookup finds a type name or the
name is qualified by the
keyword typename
The error that gcc is giving is
```
<source>:6:6: error: invalid use of incomplete type 'struct Y<A>'
6 | Y::E m;
| ^
<source>:5:25: note: definition of 'struct Y<A>' is not complete until the
closing brace
5 | template <int A> struct Y : X<A> {
| ^
```
so I'm guessing that gcc thinks that the name lookup for ``Y::E`` doesn't find
a type name because ``Y`` is incomplete, though I don't understand why the same
isn't true for the example in
```
https://github.com/llvm/llvm-project/pull/73018
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits