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