1template <typename T0> struct tuple {
2    typedef tuple<int> tail;
3};
4
5template <> struct tuple<int> {
6};
7
8template <typename L>
9struct length  {
10  static const int i = length<typename tuple<L>::tail>::i;
11};
12
13template<>
14struct length<tuple<int> > {
15    static const int i = 1;
16};
17
18template <int> struct M {};
19
20template <typename A>
21M<length<tuple<A> >::i > foo (A*);
22
23template <typename A>
24M<length<tuple<A> >::i> foo (const A*);
25
26const int i1 = 3;
27
28void bar() {
29  foo (&i1);
30}
31