Hello, the following should probably be flagged as an error without requiring an instantiation of the template:
------------------------------- struct A; template <class> struct B { void foo(void) { A a; } }; ------------------------------- GCC accepts the code without complaining. -- Summary: Incomplete types are not detected at template definition time Product: gcc Version: unknown Status: UNCONFIRMED Keywords: accepts-invalid Severity: normal Priority: P2 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: giovannibajo at libero dot it CC: gcc-bugs at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21976