1f4a2713aSLionel Sambuc template<typename T> struct SomeTemplate {}; 2f4a2713aSLionel Sambuc 3f4a2713aSLionel Sambuc struct DefinedInCommon { 4f4a2713aSLionel Sambuc void f(); 5f4a2713aSLionel Sambuc struct Inner {}; 6f4a2713aSLionel Sambuc friend void FoundByADL(DefinedInCommon); 7f4a2713aSLionel Sambuc }; 8f4a2713aSLionel Sambuc 9f4a2713aSLionel Sambuc template<typename T> struct CommonTemplate { 10f4a2713aSLionel Sambuc enum E { a = 1, b = 2, c = 3 }; 11f4a2713aSLionel Sambuc }; 12*0a6a1f1dSLionel Sambuc 13*0a6a1f1dSLionel Sambuc namespace Std { 14*0a6a1f1dSLionel Sambuc template<typename T> struct WithFriend { 15*0a6a1f1dSLionel Sambuc friend bool operator!=(const WithFriend &A, const WithFriend &B) { return false; } 16*0a6a1f1dSLionel Sambuc }; 17*0a6a1f1dSLionel Sambuc } 18*0a6a1f1dSLionel Sambuc 19*0a6a1f1dSLionel Sambuc namespace Std { f()20*0a6a1f1dSLionel Sambuc template<typename T> void f() { 21*0a6a1f1dSLionel Sambuc extern T g(); 22*0a6a1f1dSLionel Sambuc } 23*0a6a1f1dSLionel Sambuc } 24*0a6a1f1dSLionel Sambuc 25*0a6a1f1dSLionel Sambuc template<typename T> struct TemplateInstantiationVisibility { typedef int type; }; 26*0a6a1f1dSLionel Sambuc 27*0a6a1f1dSLionel Sambuc template<typename T> struct Outer { 28*0a6a1f1dSLionel Sambuc template<typename U> struct Inner { 29*0a6a1f1dSLionel Sambuc static constexpr int f(); 30*0a6a1f1dSLionel Sambuc static constexpr int g(); 31*0a6a1f1dSLionel Sambuc }; 32*0a6a1f1dSLionel Sambuc }; 33*0a6a1f1dSLionel Sambuc 34*0a6a1f1dSLionel Sambuc template<typename T> struct WithPartialSpecialization {}; 35*0a6a1f1dSLionel Sambuc template<typename T> struct WithPartialSpecialization<void(T)> { typedef int type; }; 36*0a6a1f1dSLionel Sambuc typedef WithPartialSpecialization<int*> WithPartialSpecializationUse; 37*0a6a1f1dSLionel Sambuc typedef WithPartialSpecialization<void(int)> WithPartialSpecializationUse2; 38*0a6a1f1dSLionel Sambuc 39*0a6a1f1dSLionel Sambuc template<typename T> struct WithExplicitSpecialization; 40*0a6a1f1dSLionel Sambuc typedef WithExplicitSpecialization<int> WithExplicitSpecializationUse; 41*0a6a1f1dSLionel Sambuc 42*0a6a1f1dSLionel Sambuc template<typename T> struct WithImplicitSpecialMembers { int n; }; 43*0a6a1f1dSLionel Sambuc 44*0a6a1f1dSLionel Sambuc template<typename T> struct WithAliasTemplate { 45*0a6a1f1dSLionel Sambuc template<typename> using X = T; 46*0a6a1f1dSLionel Sambuc }; 47*0a6a1f1dSLionel Sambuc 48*0a6a1f1dSLionel Sambuc template<typename T> struct WithAnonymousDecls { 49*0a6a1f1dSLionel Sambuc struct { bool k; }; 50*0a6a1f1dSLionel Sambuc union { int a, b; }; 51*0a6a1f1dSLionel Sambuc struct { int c, d; } s; 52*0a6a1f1dSLionel Sambuc enum { e = 123 }; 53*0a6a1f1dSLionel Sambuc typedef int X; 54*0a6a1f1dSLionel Sambuc }; 55*0a6a1f1dSLionel Sambuc 56*0a6a1f1dSLionel Sambuc #include "cxx-templates-textual.h" 57