[Clang] CTAD for alias template failed as a default type argument is not used for deduction (original) (raw)
template struct A {};
template using Foo = A<A>;
template using Bar = Foo;
Bar a{};
Output:
:10:5: error: no viable constructor or deduction guide for deduction of template arguments of 'Bar' 10 | Bar a{}; | ^ :8:1: note: candidate template ignored: couldn't infer template argument 'T' 8 | using Bar = Foo; | ^ :8:1: note: implicit deduction guide declared as 'template requires __is_deducible(Foo, A>) && __is_deducible(Bar, A>) Bar() -> A>' :8:1: note: candidate function template not viable: requires 1 argument, but 0 were provided 2 | struct A {}; | ~ 3 | 4 | template 5 | using Foo = A>; 6 | 7 | template 8 | using Bar = Foo; | ^ :8:1: note: implicit deduction guide declared as 'template requires __is_deducible(Foo, A>) && __is_deducible(Bar, A>) Bar(A>) -> A>' 1 error generated.