// Submitted by Marcelo Matus %module template_ns_inherit %inline %{ namespace hello { typedef double Double; } namespace hello { template class VUnaryFunction {}; template class UnaryFunction : public VUnaryFunction {}; } %} namespace hello { %template(VUnaryFunction_id) VUnaryFunction; %template(UnaryFunction_id) UnaryFunction; }