summaryrefslogtreecommitdiff
path: root/Examples/test-suite/cpp11_sizeof_object.i
blob: fca8a8cccb84d023117f2c918060484cca46ed8c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/* This testcase checks whether SWIG correctly uses the sizeof() on the
   concrete objects and not only types introduced in C++11. */
%module cpp11_sizeof_object

%inline %{
struct B {
  unsigned long member1;
  long long member2;
  char member3;
};

struct A {
  B member;
};

const int a = sizeof(A::member);
%}