PageRenderTime 37ms CodeModel.GetById 20ms app.highlight 15ms RepoModel.GetById 1ms app.codeStats 0ms

/tags/rel-1.3.35/Examples/test-suite/li_implicit.i

#
Swig | 23 lines | 19 code | 4 blank | 0 comment | 0 complexity | 73d371c07adab00ee73be3d31ed7e2ac MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
 1%module("nocastmode") li_implicit
 2#pragma SWIG nowarn=SWIGWARN_PP_CPP_WARNING
 3%include implicit.i
 4
 5%inline 
 6{
 7  struct B { };  
 8}
 9
10%implicit(A, int, double, B);
11
12%inline 
13{
14  struct A
15  {
16    int ii;
17    A(int i) { ii = 1; }
18    A(double d) { ii = 2; }
19    A(const B& b) { ii = 3; }
20  };
21
22  int get(const A& a) { return a.ii; }
23}