1 template <int I>
2 struct A {
3 };
4 
5 template <typename T>
6 struct B {
7   typedef typename T::type type;
8   static const type j = T::j;
9 
10   A<j> b;
11 };
12 
13 struct C {
14   typedef int type;
15   static const int j = 3;
16 };
17 
18 int i = B<C>::j;
19 
20