[clang] Reland: [clang] Finish implementation of P0522 (PR #111711)
James Y Knight via cfe-commits
cfe-commits at lists.llvm.org
Thu Oct 10 20:33:17 PDT 2024
jyknight wrote:
Here's another test-case which is broken by this commit (both at this commit, and after the follow-up PRs). It seems to no longer allow non-type template packs of multiple types. I'm surprised we have no test-cases for this in the clang test-suite!
```
template <template <auto...> class Arg>
struct TmplTmpl {};
template <int A, short B>
struct Tmpl;
using Test = TmplTmpl<Tmpl>;
```
```
test.cc:1:28: error: deduced non-type template argument does not have the same type as the corresponding template parameter ('int' vs 'short')
1 | template <template <auto...> class Arg>
| ^
test.cc:7:23: note: template template argument has different template parameters than its corresponding template template parameter
7 | using Test = TmplTmpl<Tmpl>;
| ^
test.cc:1:36: note: previous template template parameter is here
1 | template <template <auto...> class Arg>
| ~~~~~~~~~~~~~~~~~~ ^
test.cc:4:24: note: template parameter is declared here
4 | template <int A, short B>
| ^
1 error generated.
```
https://github.com/llvm/llvm-project/pull/111711
More information about the cfe-commits
mailing list