Merge from mainline (167278:168000).
[official-gcc/graphite-test-results.git] / gcc / testsuite / g++.dg / template / sfinae3.C
blob349463d95fe3680f893bbbdd704148cfc69f4588
1 // PR c++/24671
2 // { dg-do compile }
4 template<typename> struct A
6   typedef int X;
7   static const int i = 0;
8 };
10 template<typename> struct B
12   B(const B&);
13   typedef typename A<char[A<B>::i]>::X Y; // { dg-error "forbids zero-size array" }
14   template<typename T> B(T, Y);
17 B<int> b(0,0); // { dg-message "instantiated from here" }