@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; @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; } 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; template struct MergeSpecializations; template struct MergeSpecializations { typedef int partially_specialized_in_b; }; template<> struct MergeSpecializations { typedef int explicitly_specialized_in_b; }; @import cxx_templates_a; template void UseDefinedInBImplIndirectly(T &v) { PerformDelayedLookup(v); } void TriggerInstantiation() { UseDefinedInBImpl(); }