https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122049
Bug ID: 122049
Summary: Missing warning when a deprecated class template is
used via CTAD in function scope
Product: gcc
Version: 15.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: rs2740 at gmail dot com
Target Milestone: ---
template<class F>
struct [[deprecated]] X { X(F);};
void f() {
X x{0};
}
This doesn't warn, but it should. Supplying the template argument (X<int>) does
result in a warning, as does moving the declaration to namespace scope.