@import cxx_templates_common; template T f() { return T(); } template T f(T); namespace N { template T f() { return T(); } template T f(T); } template int template_param_kinds_1(); template class> int template_param_kinds_2(); template class> int template_param_kinds_3(); template struct SomeTemplate; template struct SomeTemplate {}; typedef SomeTemplate SomeTemplateIntPtr; template void PerformDelayedLookup(T &t) { t.f(); typename T::Inner inner; FoundByADL(t); } template void PerformDelayedLookupInDefaultArgument(T &t, int a = (FoundByADL(T()), 0)) {} template struct RedeclaredAsFriend {}; void use_some_template_a() { SomeTemplate a; SomeTemplate b, c; b = c; (void)&WithImplicitSpecialMembers::n; } template struct MergeTemplates; MergeTemplates<0> *merge_templates_a; auto enum_a_from_a = CommonTemplate::a; const auto enum_c_from_a = CommonTemplate::c; template struct UseInt; template void UseRedeclaredEnum(UseInt::a>); constexpr void (*UseRedeclaredEnumA)(UseInt<1>) = UseRedeclaredEnum; template struct MergeSpecializations; template struct MergeSpecializations { typedef int partially_specialized_in_a; }; template<> struct MergeSpecializations { typedef int explicitly_specialized_in_a; }; void InstantiateWithFriend(Std::WithFriend wfi) {} template struct WithPartialSpecialization { typedef int type; T &f() { static T t; return t; } }; typedef WithPartialSpecializationUse::type WithPartialSpecializationInstantiate; typedef WithPartialSpecialization::type WithPartialSpecializationInstantiate2; template<> struct WithExplicitSpecialization { int n; template T &inner_template() { return n; } }; template template constexpr int Outer::Inner::f() { return 1; } static_assert(Outer::Inner::f() == 1, ""); template struct MergeTemplateDefinitions { static constexpr int f(); static constexpr int g(); }; template constexpr int MergeTemplateDefinitions::f() { return 1; } template using AliasTemplate = T; template struct PartiallyInstantiatePartialSpec {}; template struct PartiallyInstantiatePartialSpec { static T *foo() { return reinterpret_cast(0); } static T *bar() { return reinterpret_cast(0); } }; typedef PartiallyInstantiatePartialSpec PartiallyInstantiatePartialSpecHelper; void InstantiateWithAliasTemplate(WithAliasTemplate::X); inline int InstantiateWithAnonymousDeclsA(WithAnonymousDecls x) { return (x.k ? x.a : x.b) + (x.k ? x.s.c : x.s.d) + x.e; } inline int InstantiateWithAnonymousDeclsB2(WithAnonymousDecls x); template struct MergeAnonUnionMember { MergeAnonUnionMember() { (void)values.t1; } union { int t1; } values; }; inline MergeAnonUnionMember<> maum_a() { return {}; } template struct DontWalkPreviousDeclAfterMerging { struct Inner { typedef T type; }; }; namespace TestInjectedClassName { template struct X { X(); }; typedef X A; }