summaryrefslogtreecommitdiff
path: root/Examples/test-suite/cpp11_using_typedef_struct.i
diff options
context:
space:
mode:
Diffstat (limited to 'Examples/test-suite/cpp11_using_typedef_struct.i')
-rw-r--r--Examples/test-suite/cpp11_using_typedef_struct.i21
1 files changed, 21 insertions, 0 deletions
diff --git a/Examples/test-suite/cpp11_using_typedef_struct.i b/Examples/test-suite/cpp11_using_typedef_struct.i
new file mode 100644
index 000000000..81efdc310
--- /dev/null
+++ b/Examples/test-suite/cpp11_using_typedef_struct.i
@@ -0,0 +1,21 @@
+%module cpp11_using_typedef_struct
+
+%inline
+%{
+namespace nspace1 {
+ typedef struct _xAffineMatrix {
+ int x, y, z;
+ } AffineMatrix;
+
+ struct _xCacheView {
+ int x;
+ };
+ typedef struct _xCacheView CacheView;
+}
+
+using nspace1::AffineMatrix;
+using nspace1::CacheView;
+
+int fn1(AffineMatrix a) { return a.x; };
+int fn2(CacheView a) { return a.x; };
+%}