https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99141
Bug ID: 99141
Summary: Name of deduced type unchecked in deduction guide
Product: gcc
Version: 11.0
URL: https://godbolt.org/z/bEhjsc
Status: UNCONFIRMED
Keywords: accepts-invalid
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: johelegp at gmail dot com
CC: johelegp at gmail dot com
Target Milestone: ---
Context
(https://timsong-cpp.github.io/cppwp/n4861/temp.deduct.guide#nt:deduction-guide):
> deduction-guide:
> explicit-specifieropt template-name ( parameter-declaration-clause ) ->
> simple-template-id ;
The requirement
(https://timsong-cpp.github.io/cppwp/n4861/temp.deduct.guide#3.sentence-3):
> The template-name shall be the same identifier as the template-name of the
> simple-template-id.
See https://godbolt.org/z/bEhjsc.
```C++
template<class>struct A;
template<class>using B=A<int>;
A(int)->B<int>;
```