https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81139
Bug ID: 81139 Summary: Non-deduced return type in abbreviated function template Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: andrew.n.sutton at gmail dot com Target Milestone: --- When a constrained-type-specifier is the same as that of a parameter type, the return type is not deduced. template<typename T> concept bool C = true; C f(C) { return 0; } void g() { auto x = f("x"); static_assert(std::is_same<decltype(x), int>::value); } The static assertion should fail.