The great merge
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@4141 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
6fcc22a1f8
commit
516036631c
1508 changed files with 125983 additions and 44037 deletions
56
SWIG/Examples/test-suite/using_namespace.i
Normal file
56
SWIG/Examples/test-suite/using_namespace.i
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
%module using_namespace
|
||||
|
||||
%warnfilter(801) hi::hi0; /* Ruby, wrong class name */
|
||||
%warnfilter(801) hi::hi1; /* Ruby, wrong class name */
|
||||
|
||||
%warnfilter(802, 813) Hi<hello::Hello, hi::hi0>; // Ruby, Java multiple inheritance
|
||||
|
||||
%inline %{
|
||||
namespace hello
|
||||
{
|
||||
struct Hello
|
||||
{
|
||||
};
|
||||
|
||||
template <class _T1, class _T2>
|
||||
struct Hi : _T1, _T2
|
||||
{
|
||||
int value1() const
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
namespace hi
|
||||
{
|
||||
|
||||
struct hi0
|
||||
{
|
||||
};
|
||||
|
||||
}
|
||||
%}
|
||||
|
||||
namespace hello
|
||||
{
|
||||
%template(Hi_hi0) Hi<hello::Hello, hi::hi0>;
|
||||
}
|
||||
|
||||
|
||||
%inline %{
|
||||
namespace hi
|
||||
{
|
||||
struct hi1 : private hello::Hi< hello::Hello, hi0 >
|
||||
{
|
||||
// This works
|
||||
// using hello::Hi< hello::Hello, hi::hi0 >::value1;
|
||||
|
||||
// This doesn't
|
||||
using hello::Hi< hello::Hello, hi0 >::value1;
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
%}
|
||||
Loading…
Add table
Add a link
Reference in a new issue