%module template_specialization_enum %inline %{ enum Hello { hi, hello }; template struct C { }; template struct Base { }; template struct C : Base { int hello() { return hello; } protected: C() { } }; template struct C : Base { int hi() { return hi; } protected: C() { } }; %} %template(Base_dd) Base; %template(Base_ii) Base; %template(C_i) C; %template(C_d) C;