kkaempf / swig-issues

Issues from SWIG (testing)
0 stars 0 forks source link

vector of vector #33

Open SwigAtSF opened 11 years ago

SwigAtSF commented 11 years ago

Nitro wrote:

Am Mon, 12 Jun 2006 10:52:33 +0200 hat Nitro nitro@dr-code.org
geschrieben:

%module vectorOfVector

%{

include

using namespace std; %}

%include "stl.i"

using namespace std;

%template (fvector) vector; %template (ffvector) vector< vector >;

This causes a bug because

 template <>  struct traits<vector<float,std::

allocator > > {

appears twice in the wrapper code (redefinition). I am using this with MSVC 2003 if that matters. Should I add this to the bug tracker?

-Matthias

Hmm, just discovered that

a) replacing stl.i with std_vector.i changes nothing (just in case) b) if I prefix the vector with std:: in the two % template lines, then the
bug disappears for some strange reason...

Please add this into the bug tracker.

Thanks William

SwigAtSF commented 11 years ago

Please use the following workaround for now:

//using namespace std; //%template (fvector) vector; //%template (ffvector) vector< vector >;

%template (fvector) std::vector; %template (ffvector) std::vector< std::vector >;