more examples, and fixes
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6432 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
f9974297d6
commit
50b87f398b
17 changed files with 123 additions and 28 deletions
|
|
@ -36,6 +36,42 @@
|
|||
}
|
||||
|
||||
};
|
||||
|
||||
template <class T>
|
||||
struct Alloc
|
||||
{
|
||||
};
|
||||
|
||||
|
||||
template <class T, class A = double >
|
||||
struct D
|
||||
{
|
||||
D(int){}
|
||||
};
|
||||
|
||||
|
||||
template <>
|
||||
struct D<double>
|
||||
{
|
||||
D(){}
|
||||
int foo() { return 0; }
|
||||
};
|
||||
|
||||
|
||||
|
||||
template <class T, class A = Alloc<T> >
|
||||
struct Vector
|
||||
{
|
||||
Vector(int){}
|
||||
};
|
||||
|
||||
|
||||
template <>
|
||||
struct Vector<double>
|
||||
{
|
||||
Vector(){}
|
||||
int foo() { return 0; }
|
||||
};
|
||||
|
||||
|
||||
%}
|
||||
|
|
@ -49,4 +85,11 @@
|
|||
//
|
||||
// This one fails
|
||||
//
|
||||
%template(C_dd) C<double,double>;
|
||||
%template(C_d) C<double>;
|
||||
|
||||
%template(D_i) D<int>;
|
||||
%template(D_d) D<double>;
|
||||
|
||||
%template(Vector_i) Vector<int>;
|
||||
%template(Vector_d) Vector<double, Alloc<double> >;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue