aboutsummaryrefslogtreecommitdiff
path: root/Examples/test-suite/copyctor.i
diff options
context:
space:
mode:
Diffstat (limited to 'Examples/test-suite/copyctor.i')
-rw-r--r--Examples/test-suite/copyctor.i22
1 files changed, 22 insertions, 0 deletions
diff --git a/Examples/test-suite/copyctor.i b/Examples/test-suite/copyctor.i
new file mode 100644
index 000000000..6153be305
--- /dev/null
+++ b/Examples/test-suite/copyctor.i
@@ -0,0 +1,22 @@
+%module copyctor
+
+%copyctor;
+
+%inline %{
+struct Bar {};
+struct Car {};
+
+struct Foo {
+ Foo() {}
+ template <class T> Foo(const T* p) {}
+ Foo(const Bar& other) {}
+};
+
+struct Hoo {
+ Hoo() {}
+ template <class T> Hoo(const T* p) {}
+ Hoo(const Bar& other) {}
+};
+%}
+
+%template(Hoo) Hoo::Hoo<Car>;