https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103659
Bug ID: 103659 Summary: Declared function template can be deleted later Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: fchelnokov at gmail dot com Target Milestone: --- This code ``` template<class T> int foo(T); template int foo(int); template<class T> int foo(T) = delete; ``` is currently accepted by GCC, but it must not by at least two reasons: * explicit instantiation of undefined function; * deletion of already declared function. Demo: https://gcc.godbolt.org/z/EW8fvba5f