Merge from mainline (160224:163495).
[official-gcc/graphite-test-results.git] / gcc / testsuite / g++.dg / template / incomplete4.C
blobf2832a73c4ceeef54ebccb7a9205962c08712593
1 // PR c++/33501
2 // { dg-do compile }
4 class A;        // { dg-error "forward declaration" }
6 template <typename T> struct X
8   static int f (T);             // { dg-error "initializing" }
9   static const T &make ();
12 int
13 main ()
15   return X<A>::f (X<A>::make ());       // { dg-error "invalid use of incomplete type" }