[Bug c++/96943] New: incomplete type used in nested name specifier
tangyixuan at mail dot dlut.edu.cn
gcc-bugzilla@gcc.gnu.org
Sat Sep 5 13:59:12 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96943
Bug ID: 96943
Summary: incomplete type used in nested name specifier
Product: gcc
Version: 11.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: tangyixuan at mail dot dlut.edu.cn
Target Milestone: ---
The following code (maybe valid) is rejected by g++, while is accepted by
clang.
$ cat s.cpp
template < int I > struct CA1{
enum { EA = 0};
};
template < int I > struct CA2{
enum {
EA = 1, EA1 = CA2 <EA> :: EA
};
};
$ clang++ -c s.cpp
successful.
$ g++ -c s.cpp
s.cpp:6:43: error: incomplete type ‘CA2<1>’ used in nested name specifier
6 | EA = 1, EA1 = CA2 <EA> :: EA
|
Is this right?
More information about the Gcc-bugs
mailing list