summaryrefslogtreecommitdiff
path: root/Examples/test-suite/stl_no_default_constructor.i
blob: 32aff2b4646b4a90c34195345d3f50802435ac51 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
%module stl_no_default_constructor

%include <stl.i>

%inline %{
struct NoDefaultCtor {
  int value;
  NoDefaultCtor(int i) : value(i) {}
};
%}

#if defined(SWIGCSHARP) || defined(SWIGJAVA) || defined(SWIGD)
%template(VectorNoDefaultCtor) std::vector<NoDefaultCtor>;
#endif

#if defined(SWIGJAVA) || defined(SWIGJAVA)
%include <std_list.i>
%template(ListNoDefaultCtor) std::list<NoDefaultCtor>;
#endif