// RUN: clang-cc -fsyntax-only -verify %s template struct bind_metafun { typedef typename MetaFun::template apply type; }; struct add_pointer { template struct apply { typedef T* type; }; }; int i; // FIXME: if we make the declarator below a pointer (e.g., with *ip), // the error message isn't so good because we don't get the handy // 'aka' telling us that we're dealing with an int**. Should we fix // getDesugaredType to dig through pointers and such? bind_metafun::type::type ip = &i; bind_metafun::type::type fp = &i; // expected-error{{incompatible type initializing 'int *', expected 'bind_metafun::type::type' (aka 'float *')}} template struct extract_type_type { typedef typename T::type::type t; }; double d; extract_type_type >::t dp = &d;