From de5e00b97abe442a1d21fe7d33c37569bb72d52c Mon Sep 17 00:00:00 2001 From: Marcelo Matus Date: Wed, 14 Jan 2004 02:45:29 +0000 Subject: [PATCH] added constructor case git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5630 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- Examples/test-suite/conversion_ns_template.i | 35 +++++++++++++++++--- 1 file changed, 31 insertions(+), 4 deletions(-) diff --git a/Examples/test-suite/conversion_ns_template.i b/Examples/test-suite/conversion_ns_template.i index 34102f98f..57ff8a83c 100644 --- a/Examples/test-suite/conversion_ns_template.i +++ b/Examples/test-suite/conversion_ns_template.i @@ -2,12 +2,24 @@ %{ namespace oss { + struct Hi + { + Hi(){} + Hi(int){} + }; + enum Test {One, Two}; + template struct Foo { + Foo(){} }; + template struct Bar { + Bar(){ } + Bar(int){ } + operator int() { return 0; } operator int&() { static int num = 0; return num; } operator Foo() { return Foo(); } @@ -20,20 +32,35 @@ { enum Test {One, Two}; + // these works + %ignore Hi::Hi(); + %rename(create) Hi::Hi(int); + + struct Hi + { + Hi(); + Hi(int); + }; + template struct Foo { + Foo(); }; - // these two works + // these works %rename(hello1) Bar::operator int&(); %ignore Bar::operator int(); - - // these don't %rename(hello2) Bar::operator Foo&(); - %ignore Bar::operator Foo(); + %ignore Bar::operator Foo(); + + // these don't + %ignore Bar::Bar(); + %rename(create) Bar::Bar(int); template struct Bar { + Bar(); + Bar(int); operator int(); operator int&(); operator Foo();