test.i:
%module Test
%include "test.h"
%{
#include "test.h"
%}
test.h:
struct TestStruct {
double coeffs[3][3][2];
};
The generated wrapper gives the following error:
test.cc: In function `PyObject*
_wrap_TestStruct_coeffs_set(PyObject*, PyObject*)':
test.cc:2588: error: ISO C++ forbids assignment of
arrays
I'm using SWIG 1.3.29 and gcc 3.4.5. Interestingly,
SWIG 1.3.25 produces compilable code.
Logged In: YES
user_id=14972
Thanks for your bug report.
I've done some investigating, but not found a fix yet. I'm
going to leave this for now, but here are my findings in
case somebody else wants to look.
SWIG 1.3.27 also produces compilable code.
And it's not python-specific - PHP also produces compilable
code with 1.3.27 but not with CVS HEAD.
Still present, but we also have a ticket for this in the tracker we use now so closing this as a duplicate:
https://github.com/swig/swig/issues/142