[clang] [Clang][Sema] Diagnose variable template explicit specializations with storage-class-specifiers (PR #93873)
Krystian Stasiowski via cfe-commits
cfe-commits at lists.llvm.org
Thu May 30 14:17:24 PDT 2024
sdkrystian wrote:
@mizvekov GCC seems to be right; [[decl.meaning.general] p3.3](eel.is/c++draft/dcl.meaning.general#3.3) requires that the specialized declaration be nominable (per [[basic.scope.scope] p7](eel.is/c++draft/basic.scope.scope#7)) in `S` (which in this case is the global namespace). The primary template does not inhabit the global namespace nor any member of the inline namespace set thereof, so this should be ill-formed. Making the unnamed namespace declaration `inline` results in GCC accepting the declaration.
https://github.com/llvm/llvm-project/pull/93873
More information about the cfe-commits
mailing list