1 @import cxx_templates_common; 2 3 template<typename T> T f(); 4 template<typename T> T f(T t) { return t; } 5 namespace N { 6 template<typename T> T f(); 7 template<typename T> T f(T t) { return t; } 8 } 9 10 template<typename> int template_param_kinds_1(); 11 template<template<typename, int, int...> class> int template_param_kinds_2(); 12 template<template<typename T, typename U, U> class> int template_param_kinds_3(); 13 14 template<typename T> struct SomeTemplate<T&> {}; 15 template<typename T> struct SomeTemplate<T&>; 16 typedef SomeTemplate<int&> SomeTemplateIntRef; 17 18 extern DefinedInCommon &defined_in_common; 19 20 @import cxx_templates_b_impl; 21 22 template<typename T, typename> struct Identity { typedef T type; }; 23 template<typename T> void UseDefinedInBImpl() { 24 typename Identity<DefinedInBImpl, T>::type dependent; 25 FoundByADL(dependent); 26 typename Identity<DefinedInBImpl, T>::type::Inner inner; 27 dependent.f(); 28 } 29 30 extern DefinedInBImpl &defined_in_b_impl; 31 32 template<typename T> 33 struct RedeclareTemplateAsFriend { 34 template<typename U> 35 friend struct RedeclaredAsFriend; 36 }; 37 38 @import cxx_templates_a; 39 template<typename T> void UseDefinedInBImplIndirectly(T &v) { 40 PerformDelayedLookup(v); 41 } 42 43 void TriggerInstantiation() { 44 UseDefinedInBImpl<void>(); 45 } 46