summaryrefslogtreecommitdiff
path: root/Examples/test-suite/li_implicit.i
diff options
context:
space:
mode:
Diffstat (limited to 'Examples/test-suite/li_implicit.i')
-rw-r--r--Examples/test-suite/li_implicit.i23
1 files changed, 23 insertions, 0 deletions
diff --git a/Examples/test-suite/li_implicit.i b/Examples/test-suite/li_implicit.i
new file mode 100644
index 0000000..0ce10dd
--- /dev/null
+++ b/Examples/test-suite/li_implicit.i
@@ -0,0 +1,23 @@
+%module("nocastmode") li_implicit
+#pragma SWIG nowarn=SWIGWARN_PP_CPP_WARNING
+%include implicit.i
+
+%inline
+{
+ struct B { };
+}
+
+%implicit(A, int, double, B);
+
+%inline
+{
+ struct A
+ {
+ int ii;
+ A(int i) { ii = 1; }
+ A(double d) { ii = 2; }
+ A(const B& b) { ii = 3; }
+ };
+
+ int get(const A& a) { return a.ii; }
+}