1// PR c++/33501 2// { dg-do compile } 3 4class A; // { dg-message "forward declaration" } 5 6template <typename T> struct X 7{ 8 static int f (T); // { dg-message "initializing" } 9 static const T &make (); 10 static const bool value = sizeof (f (make ())) == sizeof (int); // { dg-error "invalid use of incomplete type" } 11}; 12 13int 14main () 15{ 16 return X <A>::value; 17} 18