// RUN: %clang_cc1 -fsyntax-only -verify %s template class MetaFun, typename Value> struct apply { typedef typename MetaFun::type type; }; template struct add_pointer { typedef T* type; }; template struct add_reference { typedef T& type; }; int i; apply::type ip = &i; apply::type ir = i; apply::type fr = i; // expected-error{{non-const lvalue reference to type 'float' cannot bind to a value of unrelated type 'int'}} // Template template parameters template struct B; // expected-note{{has a different type 'int'}} template class X> // expected-error{{cannot have type 'float'}} \ // expected-note{{with type 'long'}} struct X0 { }; X0 x0b1; X0 x0b2; // expected-note{{while substituting}} X0 x0b3; // expected-error{{template template argument has different template parameters}} template class TT> // expected-note{{parameter with type 'int'}} struct X1 { }; template class TT> struct X2 { X1 x1; // expected-error{{has different template parameters}} }; template struct X3i { }; template struct X3l { }; // expected-note{{different type 'long'}} X2 x2okay; X2 x2bad; // expected-note{{instantiation}}