add private case and runtime
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6990 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
2c01a74927
commit
397f473edd
2 changed files with 20 additions and 0 deletions
3
Examples/test-suite/python/template_static_runme.py
Normal file
3
Examples/test-suite/python/template_static_runme.py
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
from template_static import *
|
||||
|
||||
print Foo.bar_double(1)
|
||||
|
|
@ -14,3 +14,20 @@ template<class T> int foo<T>::test = 0;
|
|||
%template(foo_i) foo<int>;
|
||||
%template(foo_d) foo<double>;
|
||||
|
||||
|
||||
%inline %{
|
||||
namespace toto {
|
||||
class Foo {
|
||||
public:
|
||||
template<class T>
|
||||
static double bar(int i) {
|
||||
return 1.0;
|
||||
};
|
||||
|
||||
private:
|
||||
int i;
|
||||
};
|
||||
}
|
||||
%}
|
||||
|
||||
%template(bar_double) toto::Foo::bar<double>;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue