swig/Examples/test-suite/template_enum_ns_inherit.i
Olly Betts d3809285a4 Change class names in test code which clash with PHP reserved words
(Interface, Class, and Function - these are case insensitive reserved
words in PHP).

Fix lists of expected methods in rename_scope_runme.php to match those
which we expect with PHP5.  With this and the change above, this testcase
now passes.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11545 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-08-13 03:58:09 +00:00

48 lines
932 B
OpenEdge ABL

%module template_enum_ns_inherit
%inline %{
namespace oss
{
enum Polarization { UnaryPolarization, BinaryPolarization };
template <Polarization P>
struct Interface_
{
};
template <Polarization P, class C>
struct Module
{
};
}
%}
namespace oss
{
%template(Interface_UP) Interface_<UnaryPolarization>;
%template(Module_UPIUP) Module<UnaryPolarization,Interface_<UnaryPolarization> >;
}
%inline %{
namespace oss
{
namespace hello
{
struct HInterface1 :
Interface_<oss::UnaryPolarization> // this works (with fullns qualification)
{
};
struct HInterface2 :
Interface_<UnaryPolarization> // this doesn't work
{
};
struct HModule1 : Module<UnaryPolarization, Interface_<UnaryPolarization> > {
};
}
}
%}