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

%inline %{
struct Foo {
   int x;
   int getx() const { return x; }
   int test() { return x; }
};

class Bar {
   Foo *f;
public:
   Bar(Foo *f) : f(f) { }
   const Foo *operator->() {
      return f;
   }
};
%}