%module typemap_template_parm_typedef %typemap(in) SWIGTYPE " _in_will_not_compile_ " %typemap(in) SWIGTYPE * " _in_will_not_compile_ " %typemap(out) SWIGTYPE " _out_will_not_compile_ " %typemap(out) SWIGTYPE * " _out_will_not_compile_ " %{ #include #include #include namespace jada { typedef unsigned int uint; void test_no_typedef(std::list bada) {} void test_typedef(std::vector bada) {} std::deque no_typedef_out() { std::deque x; return x; } } %} %typemap(in) std::list (std::list tmp) { $1 = tmp; } %typemap(in) std::vector (std::vector tmp) { $1 = tmp; } %typemap(out) std::list { } // The presennce of this 'out' typemap was hiding the std::vector 'in' typemap in swig-2.0.5 and swig-2.0.6 %typemap(out) std::vector { } // This typemap was not used for no_typedef_out in 2.0.4 and earlier #if defined(SWIGJAVA) || defined(SWIGCSHARP) %typemap(out) std::deque { $result = 0; } #else %typemap(out) std::deque { } #endif namespace jada { typedef unsigned int uint; void test_no_typedef(std::list bada); void test_typedef(std::vector bada); std::deque no_typedef_out(); }