swig/Examples/test-suite/template_matrix.i
Marvin Greenberg c3eff9234c Workaround for clang 3.2 libc++ empty struct bug.
Certain tests have empty structs or classes.
This encounters a bug with clang: http://llvm.org/bugs/show_bug.cgi?id=16764
This is fixed in later versions of clang, but not the version
currently bundled with Mavericks and XCode 5
2014-02-04 11:55:36 -05:00

72 lines
871 B
OpenEdge ABL

%module template_matrix
%{
#include <vector>
struct pop
{
};
%}
%include "std_vector.i"
%inline {
namespace simuPOP
{
struct POP
{
};
template<class _POP1, class _POP2 = POP>
class Operator
{
int x;
};
}
}
%template(vectorop) std::vector< simuPOP::Operator<pop> >;
namespace simuPOP
{
%template(baseOperator) Operator<pop>;
}
#if 1
namespace std
{
%template(vectori) vector<int>;
%template(matrixi) vector< vector<int> >;
%template(cubei) vector< vector< vector<int> > >;
}
%inline %{
std::vector<int>
passVector(const std::vector<int>& a)
{
return a;
}
std::vector< std::vector<int> >
passMatrix(const std::vector< std::vector<int> >& a)
{
return a;
}
std::vector< std::vector< std::vector<int> > >
passCube(const std::vector< std::vector< std::vector<int> > >& a)
{
return a;
}
%}
#endif