%module template_specialization_defarg %inline %{ template struct C { }; template struct C { int hi() { return 0; } C(int a) { } }; template struct C { int hello() { return 0; } C(double a) { } }; template struct Alloc { }; template struct D { D(int){} }; template <> struct D { D(){} int foo() { return 0; } }; template > struct Vector { Vector(int){} }; template <> struct Vector { Vector(){} int foo() { return 0; } }; %} // // This works fine // %template(C_i) C; // // This one fails // %template(C_dd) C; %template(C_d) C; %template(D_i) D; %template(D_d) D; %template(Vector_i) Vector; %template(Vector_d) Vector >;