[Clang][Regression] CTAD failure for alias template with non-type template argument
- Dominant language
- LLVM
- Stars
- 40.5k
- Forks
- 18.7k
- PR merge metrics
- PR metrics pending
Description
Consider the following C++20 code:
```c++
template
struct A {};
template
using AA = A;
AA a;
AA b{a};
```
Error since Clang trunk:
```console
:8:4: error: no viable constructor or deduction guide for deduction of template arguments of 'AA'
8 | AA b{a};
| ^
:5:1: note: candidate template ignored: deduced type 'A<[...], int{}>' of 1st parameter does not match adjusted type 'A<[...], int{} aka 0>' of argument [with T = int]
5 | using AA = A;
| ^
:5:1: note: implicit deduction guide declared as 'template requires __is_deducible(AA, A) AA(A) -> A'
:5:1: note: candidate function template not viable: requires 0 arguments, but 1 was provided
:5:1: note: implicit deduction guide declared as 'template requires __is_deducible(AA, A) AA() -> A'
1 error generated.
```
See https://compiler-explorer.com/z/jdeo8ajcc.
Contributor guide
Assessment
This issue has not been assessed yet.