1*0a6a1f1dSLionel Sambuc template<typename T> struct S { fS2*0a6a1f1dSLionel Sambuc __attribute__((always_inline)) static int f() { return 0; } gS3*0a6a1f1dSLionel Sambuc __attribute__((always_inline, visibility("hidden"))) static int g() { return 0; } 4*0a6a1f1dSLionel Sambuc }; 5*0a6a1f1dSLionel Sambuc 6*0a6a1f1dSLionel Sambuc extern template struct S<int>; 7*0a6a1f1dSLionel Sambuc 8*0a6a1f1dSLionel Sambuc template<typename T> T min(T a, T b) { return a < b ? a : b; } 9*0a6a1f1dSLionel Sambuc 10*0a6a1f1dSLionel Sambuc extern decltype(min(1, 2)) instantiate_min_decl; 11*0a6a1f1dSLionel Sambuc 12*0a6a1f1dSLionel Sambuc template<typename T> struct CtorInit { 13*0a6a1f1dSLionel Sambuc static int f() { return 0; } 14*0a6a1f1dSLionel Sambuc int a; 15*0a6a1f1dSLionel Sambuc CtorInit() : a(f()) {} 16*0a6a1f1dSLionel Sambuc }; 17*0a6a1f1dSLionel Sambuc 18*0a6a1f1dSLionel Sambuc namespace ImplicitSpecialMembers { 19*0a6a1f1dSLionel Sambuc struct A { 20*0a6a1f1dSLionel Sambuc A(const A&); 21*0a6a1f1dSLionel Sambuc }; 22*0a6a1f1dSLionel Sambuc struct B { 23*0a6a1f1dSLionel Sambuc A a; 24*0a6a1f1dSLionel Sambuc B(int); 25*0a6a1f1dSLionel Sambuc }; 26*0a6a1f1dSLionel Sambuc struct C { 27*0a6a1f1dSLionel Sambuc A a; 28*0a6a1f1dSLionel Sambuc C(int); 29*0a6a1f1dSLionel Sambuc }; 30*0a6a1f1dSLionel Sambuc struct D { 31*0a6a1f1dSLionel Sambuc A a; 32*0a6a1f1dSLionel Sambuc D(int); 33*0a6a1f1dSLionel Sambuc }; 34*0a6a1f1dSLionel Sambuc } 35*0a6a1f1dSLionel Sambuc 36*0a6a1f1dSLionel Sambuc namespace OperatorDeleteLookup { 37*0a6a1f1dSLionel Sambuc struct A { void operator delete(void*); virtual ~A() = default; }; 38*0a6a1f1dSLionel Sambuc template<typename T> struct B { void operator delete(void*); virtual ~B() {} typedef int t; }; 39*0a6a1f1dSLionel Sambuc typedef B<int>::t b_int_instantated; 40*0a6a1f1dSLionel Sambuc } 41*0a6a1f1dSLionel Sambuc 42*0a6a1f1dSLionel Sambuc namespace EmitInlineMethods { 43*0a6a1f1dSLionel Sambuc struct A { 44*0a6a1f1dSLionel Sambuc void f() {} 45*0a6a1f1dSLionel Sambuc void g(); 46*0a6a1f1dSLionel Sambuc }; 47*0a6a1f1dSLionel Sambuc struct B { 48*0a6a1f1dSLionel Sambuc void f(); 49*0a6a1f1dSLionel Sambuc void g() {} 50*0a6a1f1dSLionel Sambuc }; 51*0a6a1f1dSLionel Sambuc } 52