Issue 132618
Summary deduction guide does not work with type alias
Labels new issue
Assignees
Reporter hewillk
    https://godbolt.org/z/zWqYbrrsv
```cpp
template<class T, int N> 
struct S { S(auto); };

template<class T>
using alias_for_S = S<T, 0>;

template<class T>
S(T) -> alias_for_S<T>;
```
Clang rejects the above with:
```cpp
<source>:9:9: error: deduced type 'alias_for_S<T>' (aka 'S<T, 0>') of deduction guide is not written as a specialization of template 'S'
    9 | S(T) -> alias_for_S<T>;
      | ^~~~~~~~~~~~~~
```
However, alias_for_S is just S, so the error message is a bit confusing. The above code should work, although I'm not 100% sure.

_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to