@import cxx_templates_common; template T f(); template T f(T t) { return t; } namespace N { template T f(); template T f(T t) { return 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 SomeTemplateIntRef; extern DefinedInCommon &defined_in_common; template struct MergeTemplates; MergeTemplates<0> *merge_templates_b; template template constexpr int Outer::Inner::g() { return 2; } static_assert(Outer::Inner::g() == 2, ""); namespace TestInjectedClassName { template struct X { X(); }; typedef X B; } @import cxx_templates_b_impl; template struct Identity { typedef T type; }; template void UseDefinedInBImpl() { typename Identity::type dependent; FoundByADL(dependent); typename Identity::type::Inner inner; dependent.f(); } extern DefinedInBImpl &defined_in_b_impl; template struct RedeclareTemplateAsFriend { template friend struct RedeclaredAsFriend; }; void use_some_template_b() { SomeTemplate a; SomeTemplate b, c; b = c; WithImplicitSpecialMembers wism1, wism2(wism1); } auto enum_b_from_b = CommonTemplate::b; const auto enum_c_from_b = CommonTemplate::c; template struct UseInt; template void UseRedeclaredEnum(UseInt::a>); constexpr void (*UseRedeclaredEnumB)(UseInt<1>) = UseRedeclaredEnum; typedef WithPartialSpecialization::type WithPartialSpecializationInstantiate3; template struct MergeSpecializations; template struct MergeSpecializations { typedef int partially_specialized_in_b; }; template<> struct MergeSpecializations { typedef int explicitly_specialized_in_b; }; template using AliasTemplate = U; void InstantiateWithAliasTemplate(WithAliasTemplate::X); inline int InstantiateWithAnonymousDeclsB(WithAnonymousDecls x) { return (x.k ? x.a : x.b) + (x.k ? x.s.c : x.s.d) + x.e; } inline int InstantiateWithAnonymousDeclsB2(WithAnonymousDecls x) { return (x.k ? x.a : x.b) + (x.k ? x.s.c : x.s.d) + x.e; } @import cxx_templates_a; template void UseDefinedInBImplIndirectly(T &v) { PerformDelayedLookup(v); } void TriggerInstantiation() { UseDefinedInBImpl(); Std::f(); PartiallyInstantiatePartialSpec::foo(); WithPartialSpecialization::type x; }