%module template_using %inline { namespace foo { template class Foo { }; template T maxk(T a, T b) { return a > b ? a : b; } } using foo::maxk; } %template(maxint) foo::maxk; %template(Foofloat) foo::Foo; %template(maxfloat) maxk;