[Clang] Missing default template argument in synthesized guides during CTAD for alias template
- Dominant language
- LLVM
- Stars
- 40.5k
- Forks
- 18.7k
- PR merge metrics
- PR metrics pending
Description
```c++
template
struct A {
A(T) {}
};
template
using Foo = A;
template
using Bar = Foo;
Bar a{0};
```
Output:
```console
:12:5: error: no viable constructor or deduction guide for deduction of template arguments of 'Bar'
12 | Bar a{0};
| ^
:10:1: note: candidate template ignored: couldn't infer template argument 'U'
10 | using Bar = Foo;
| ^
:10:1: note: implicit deduction guide declared as 'template requires __is_deducible(Foo, A) && __is_deducible(Bar, A) Bar(T) -> A'
:10:1: note: candidate template ignored: could not match 'A' against 'int'
:10:1: note: implicit deduction guide declared as 'template requires __is_deducible(Foo, A) && __is_deducible(Bar, A) Bar(A) -> A'
```
See https://compiler-explorer.com/z/vcjc1qEfv.
See also #133132.
Contributor guide
Assessment
This issue has not been assessed yet.