https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104193
Bug ID: 104193 Summary: Valid function template instantiation rejected 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: --- In this code, there are two function templates with same name f and a function instantiation: ``` template <bool A, typename X> void f (X &) {} template <bool A> void f (int &) {} template void f<true> (int &x); ``` GCC rejects it and confuses the last line with a specialization. Demo: https://gcc.godbolt.org/z/5czeP85xc Related discussion: https://stackoverflow.com/q/57203155/7325599