Clang can not compile typename with non-type in using declaration
| Bugzilla Link | 46214 |
| Resolution | INVALID |
| Resolved on | Jun 05, 2020 10:19 |
| Version | trunk |
| OS | All |
| CC | @DougGregor,@zygoloid |
Extended Description
cat test.cc
namespace g_namespace { int var = 9; typedef int C; } int main() { using typename g_namespace::var; //fails using typename g_namespace::C; //ok return 0; }
$clang++-trunk test.cc
Reproduced in godbolt: https://godbolt.org/z/MgR7GF
In GCC, test.cc is compiled well.
I am wondering that is it Clang still not support this feature that using-declaration with a non-type typename or this is a bug in clang?
Specifically, this is https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65969
In GCC, test.cc is compiled well.
That's a GCC bug. The qualified name after 'typename' is required to name a type.