// RUN: %clang_cc1 -fsyntax-only -std=c++11 -verify %s template struct pair { }; template struct tuple { }; template struct is_same { static const bool value = false; }; template struct is_same { static const bool value = true; }; namespace ExpandIntoFixed { template, typename W = V*> class X0 { }; template class X1 { public: typedef X0 type; }; static_assert(is_same::type, X0, pair*>>::value, "fails with two default arguments"); static_assert(is_same::type, X0>::value, "fails with one default argument"); static_assert(is_same::type, X0>::value, "fails with no default arguments"); } namespace ExpandIntoFixedShifted { template, typename W = V*> class X0 { }; template class X1 { public: typedef X0 type; }; static_assert(is_same::type, X0, pair*>>::value, "fails with two default arguments"); static_assert(is_same::type, X0>::value, "fails with one default argument"); static_assert(is_same::type, X0>::value, "fails with no default arguments"); } namespace Deduction { template struct Foo {}; template tuple &foo(Foo); void call_foo(Foo foo_if, Foo foo_i) { tuple &t1 = foo(foo_if); tuple &t2 = foo(foo_i); } } namespace PR9021a { template struct A { }; template struct B { A a1; }; void test() { B c; } } namespace PR9021b { template struct t2 { }; template class M> struct m { template using inner = M; }; m sta2; } namespace PartialSpecialization { template struct X0; // expected-note{{template is declared here}} template struct X0 { }; X0 x0i; // expected-error{{too few template arguments for class template 'X0'}} X0 x0if; X0 x0ifd; } namespace FixedAliasTemplate { template struct S {}; template using U = S; template U &f(U, Ts...); S &s1 = f({}, 0, 0.0); }