https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79501
Bug ID: 79501 Summary: member deduction guide not recognized Product: gcc Version: 7.0.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: richard-gccbugzilla at metafoo dot co.uk Target Milestone: --- struct X { template<typename T> struct A {}; A() -> A<int>; }; ... results in: <source>:3:10: error: ISO C++ forbids declaration of 'A' with no type [-fpermissive] A() -> A<int>; ^~~~~~ <source>:3:10: error: 'A' function with trailing return type not declared with 'auto' type specifier ... and ... struct X { template<typename T> struct A {}; template<typename T> A() -> A<int>; }; ... results in: <source>:3:24: error: deduction guide 'X::A() -> X::A<int>' must be declared at namespace scope