Merged trunk at revision 161680 into branch.
[official-gcc.git] / gcc / testsuite / g++.dg / template / qualified-id3.C
blobd97ef5c592b7a90b63fd22e51f0b786f3ded0e91
1 // PR c++/44587
3 template <const int N> struct A { };
4 template <class T> struct B {
5   static const int c;
6   typedef A<B<T>::c> C;         // { dg-error "non-constant" }
7 };
8 template <class T> const int B<T>::c = sizeof (T);
10 template <const int N> struct D { };
11 template <class T> struct E {
12   static const int c = sizeof (T);
13   typedef D<E<T>::c> F;         // OK