avoid using of temporal value for wrapping type user + const reference argument

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6895 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Marcelo Matus 2004-12-18 05:57:08 +00:00
commit 7cb488e057
2 changed files with 31 additions and 2 deletions

View file

@ -52,3 +52,23 @@
%template(templatedfunction) templatedfunction<int>;
// Deafult args with references
%inline
%{
typedef int size_type;
struct Hello
{
static const size_type hello = 3;
};
int rfoo( const size_type& x = Hello::hello, const Hello& y = Hello() )
{
return x;
}
%}