c++ - error C2039: 'type_name' : is not a member of of 'swig::traits<Bar>' -


i'm unable swig wrap function returns map of pointers class instances. compile errors when generated swig code compiled.

error c2039: 'type_name' : not member of 'swig::traits<bar>'

here .i file

class foo {  ...  };   class bar { ... };  %template(mapfooptrbarptr) std::map<foo*, bar*>;   std::map<foo*, bar*> getmap(); 

add following typemap code .i file before %template. note lack of '*' after class name in return string.

%{     namespace swig {     template <> struct traits<bar>     {         typedef pointer_category category;         static const char* type_name()         {             return "bar";         }     };     } %} 

got solution from: http://swig.10945.n7.nabble.com/std-containers-and-pointers-td3728.html


Comments

Popular posts from this blog

javascript - Slick Slider width recalculation -

jsf - PrimeFaces Datatable - What is f:facet actually doing? -

angular2 services - Angular 2 RC 4 Http post not firing -