template struct tuple { typedef tuple tail; }; template <> struct tuple { }; template struct length { static const int i = length::tail>::i; }; template<> struct length > { static const int i = 1; }; template struct M {}; template M >::i > foo (A*); template M >::i> foo (const A*); const int i1 = 3; void bar() { foo (&i1); }