// PR c++/33501 // { dg-do compile } class A; // { dg-error "forward declaration" } template struct X { static int f (T); // { dg-error "initializing" } static const T &make (); }; int main () { return X::f (X::make ()); // { dg-error "invalid use of incomplete type" } }