-
Notifications
You must be signed in to change notification settings - Fork 15.3k
Open
Labels
clang:frontendLanguage frontend issues, e.g. anything involving "Sema"Language frontend issues, e.g. anything involving "Sema"
Description
Consider the following C++20 code:
template <class T, T>
struct A {};
template <class T>
using AA = A<T, T{}>;
AA<int> a;
AA b{a};Error since Clang trunk:
<source>:8:4: error: no viable constructor or deduction guide for deduction of template arguments of 'AA'
8 | AA b{a};
| ^
<source>: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<T, T{}>;
| ^
<source>:5:1: note: implicit deduction guide declared as 'template <class T> requires __is_deducible(AA, A<T, T{}>) AA(A<T, T{}>) -> A<T, T{}>'
<source>:5:1: note: candidate function template not viable: requires 0 arguments, but 1 was provided
<source>:5:1: note: implicit deduction guide declared as 'template <class T> requires __is_deducible(AA, A<T, T{}>) AA() -> A<T, T{}>'
1 error generated.Metadata
Metadata
Assignees
Labels
clang:frontendLanguage frontend issues, e.g. anything involving "Sema"Language frontend issues, e.g. anything involving "Sema"