]> gcc.gnu.org Git - gcc.git/blob - gcc/testsuite/g++.dg/template/sfinae3.C
re PR c++/26693 (Access checks not performed for types in templates)
[gcc.git] / gcc / testsuite / g++.dg / template / sfinae3.C
1 // PR c++/24671
2 // { dg-do compile }
3
4 template<typename> struct A
5 {
6 typedef int X;
7 static const int i = 0;
8 };
9
10 template<typename> struct B
11 {
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);
15 };
16
17 B<int> b(0,0); // { dg-message "instantiated from here" }
This page took 0.034843 seconds and 5 git commands to generate.