http://gcc.gnu.org/ml/gcc-patches/2008-02/msg00110.html
[official-gcc.git] / gcc / testsuite / g++.dg / init / member1.C
blobe2af0809c713cf3a8ab623e0539a5cf8734f22cb
1 // Copyright (C) 2005 Free Software Foundation, Inc.
2 // Contributed by Nathan Sidwell 13 Jun 2005 <nathan@codesourcery.com>
4 // Origin:   Ivan Godard <igodard@pacbell.net>
5 // Bug 20789: ICE on invalid
7 template<typename> struct A;
9 template<int> struct B {};
11 template<typename T> struct C
13   static const int i = A<T>::i;  // { dg-error "incomplete" }
14   static const int j = i;  // { dg-error "non-constant expression" }
15   B<j> b;  // { dg-error "not a valid template arg" }
18 C<int> c;
20 int i = C<int>::i;
21 int j = C<int>::j;