git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8249 626c5289-ae23-0410-ae9c-e8d60b6d4f22
56 lines
1,000 B
OpenEdge ABL
56 lines
1,000 B
OpenEdge ABL
// Tests typename qualification and constant resolution in default
|
|
// template arguments. Another Marcelo special.. :-).
|
|
|
|
%module template_default_qualify
|
|
|
|
%warnfilter(SWIGWARN_RUBY_WRONG_NAME) etraits; /* Ruby, wrong class name */
|
|
|
|
%inline %{
|
|
namespace oss
|
|
{
|
|
|
|
enum Polarization { UnaryPolarization, BinaryPolarization };
|
|
|
|
template <Polarization P>
|
|
struct Interface
|
|
{
|
|
};
|
|
|
|
namespace modules
|
|
{
|
|
|
|
template <class traits, class base = Interface<traits::pmode> >
|
|
// *** problem here ****
|
|
struct Module : base
|
|
{
|
|
};
|
|
}
|
|
}
|
|
struct etraits
|
|
{
|
|
static const oss::Polarization pmode = oss::UnaryPolarization;
|
|
};
|
|
|
|
%}
|
|
|
|
namespace oss
|
|
{
|
|
%template(Interface_UP) Interface<UnaryPolarization>;
|
|
namespace modules
|
|
{
|
|
%template(Module_etraits) Module<etraits>;
|
|
}
|
|
}
|
|
|
|
%inline %{
|
|
namespace oss
|
|
{
|
|
namespace modules
|
|
{
|
|
struct HModule1 : Module<etraits>
|
|
{
|
|
};
|
|
}
|
|
}
|
|
%}
|
|
|