You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Revert [Clang] prevent errors for deduction guides using deduced type aliases (#118165)
Reverts #117450
---
Revert #117450 because the
prior behavior aligns with the standard - _`template-name`_ in the
_`simple-template-id`_ in the return type shall be the actual name of a
class template rather than some equivalent alias template. Details
#54909 (comment).
A(int) -> int; // expected-error {{deduced type 'int' of deduction guide is not a specialization of template 'A'}}
36
-
template <typename T> A(T)->B<T>;
36
+
template <typename T> A(T)->B<T>;// expected-error {{deduced type 'B<T>' (aka 'A<T>') of deduction guide is not written as a specialization of template 'A'}}
37
37
template<typename T> A(T*) -> const A<T>; // expected-error {{deduced type 'const A<T>' of deduction guide is not a specialization of template 'A'}}
38
38
39
39
// A deduction-guide shall be declared in the same scope as the corresponding
template <typename T> A() -> C<T>; // expected-error {{deduced type 'C<T>' (aka 'GH54909::B') of deduction guide is not a specialization of template 'A'}}
0 commit comments