new test
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@4857 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
997070860e
commit
972acd608a
4 changed files with 39 additions and 0 deletions
|
|
@ -208,6 +208,7 @@ CPP_TEST_CASES += \
|
|||
template_ns_scope \
|
||||
template_qualifier \
|
||||
template_qualifier \
|
||||
template_ref_type \
|
||||
template_rename \
|
||||
template_retvalue \
|
||||
template_specialization \
|
||||
|
|
|
|||
|
|
@ -0,0 +1,6 @@
|
|||
use template_ref_type;
|
||||
|
||||
my $xr = template_ref_type::XC->new();
|
||||
my $y = template_ref_type::Y->new();
|
||||
|
||||
$y->find($xr);
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
import template_ref_type
|
||||
|
||||
xr = template_ref_type.XC()
|
||||
y = template_ref_type.Y()
|
||||
y.find(xr)
|
||||
27
SWIG/Examples/test-suite/template_ref_type.i
Normal file
27
SWIG/Examples/test-suite/template_ref_type.i
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
%module template_ref_type
|
||||
|
||||
%inline %{
|
||||
class X {
|
||||
public:
|
||||
unsigned _i;
|
||||
};
|
||||
|
||||
template <class T> class Container {
|
||||
public:
|
||||
Container () {}
|
||||
bool reset () { return false ;}
|
||||
};
|
||||
|
||||
typedef Container<X> XC;
|
||||
%}
|
||||
|
||||
%template(XC) Container<X>;
|
||||
|
||||
%inline %{
|
||||
class Y {
|
||||
public:
|
||||
Y () {};
|
||||
bool find (XC &) { return false; }
|
||||
};
|
||||
%}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue