// This testcase is almost identical to template_partial_specialization but uses typedefs for %template %module template_partial_specialization_typedef %inline %{ namespace TypeDef { typedef double Double; typedef int * IntPtr; typedef double * DoublePtr; typedef double & DoubleRef; typedef const double & ConstDoubleRef; typedef double * const & DoublePtrConstRef; typedef int Int; typedef int * const & IntPtrConstRef; typedef int ** IntPtrPtr; typedef float Float; typedef float * FloatPtr; typedef float ** FloatPtrPtr; typedef float *** FloatPtrPtrPtr; typedef bool * BoolPtr; typedef char * CharPtr; typedef short * ShortPtr; typedef long * LongPtr; typedef unsigned int ** UnsignedIntPtrPtr; typedef unsigned int *** UnsignedIntPtrPtrPtr; typedef const unsigned int ** ConstUnsignedIntPtr; typedef const unsigned int *** ConstUnsignedIntPtrPtr; } namespace One { template struct OneParm { void a() {} }; template struct OneParm { void b() {} }; template struct OneParm { void c() {} }; template struct OneParm { void d() {} }; template struct OneParm { void e() {} }; template <> struct OneParm { void f() {} }; template <> struct OneParm { void g() {} }; template <> struct OneParm { void h() {} }; template <> struct OneParm { void j() {} }; template <> struct OneParm { void k() {} }; template <> struct OneParm { void m() {} }; template <> struct OneParm { void n() {} }; } %} // partial specializations %template(A) One::OneParm; %template(B) One::OneParm; %template(C) One::OneParm; %template(D) One::OneParm; %template(E) One::OneParm; // explicit specializations %template(F) One::OneParm; %template(G) One::OneParm; %template(H) One::OneParm; // %template scope explicit specializations namespace One { %template(J) One::OneParm; %template(K) ::One::OneParm; } %template(M) ::One::OneParm; namespace One { %template(N) OneParm; } // %template scope partial specializations namespace One { %template(BB) One::OneParm; %template(BBB) ::One::OneParm; } %template(BBBB) ::One::OneParm; namespace One { %template(BBBBB) OneParm; } // non-exact match %template(B1) One::OneParm; %template(B2) One::OneParm; %template(B3) One::OneParm; %template(B4) One::OneParm; // Two parameter specialization tests %inline %{ struct Concrete {}; namespace Two { template struct TwoParm { void a() {} }; template struct TwoParm { void b() {} }; template struct TwoParm { void c() {} }; template struct TwoParm { void d() {} }; template struct TwoParm { void e() {} }; template struct TwoParm { void f() {} }; template <> struct TwoParm { void g() {} }; } %} %inline %{ namespace TypeDef { typedef const double * ConstDoublePtr; typedef const int * ConstIntPtr; typedef int * IntPtr; typedef Concrete * ConcretePtr; typedef const Concrete * ConstConcretePtr; typedef void * VoidPtr; } %} namespace Two { %template(A_) TwoParm; %template(B_) TwoParm; %template(C_) TwoParm; %template(D_) TwoParm; %template(E_) TwoParm; %template(F_) TwoParm; %template(G_) TwoParm; %template(C1_) TwoParm; %template(C2_) TwoParm; } %template(C3_) Two::TwoParm; %template(C4_) ::Two::TwoParm; %template(B1_) ::Two::TwoParm; %template(E1_) Two::TwoParm; %template(E2_) Two::TwoParm;