%module template_specialization_defarg %inline %{ template struct C { }; template struct C { int hi() { return 0; } C(int a = 0) { } protected: C() { } }; template struct C { int hello() { return 0; } C(double a = 0) { } protected: C() { } }; %} // // This works fine // %template(C_i) C; // // This one fails // %template(C_d) C;