swig/Examples/test-suite/template_ns_enum2.i
Marcelo Matus f66e70d525 fix kw warning for perl
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7713 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-10-25 09:35:13 +00:00

42 lines
641 B
OpenEdge ABL

%module template_ns_enum2
#ifdef SWIGPERL
%rename(_eval) eval;
#endif
%inline %{
namespace hi
{
enum Hello { Hi, Hola };
template <Hello>
struct traits
{
};
template <>
struct traits<Hi>
{
typedef int value_type;
};
template <>
struct traits<Hola>
{
typedef double value_type;
};
struct B
{
const traits<Hola>::value_type&
eval(const traits<Hola>::value_type& e) const;
};
const traits<Hola>::value_type&
B::eval(const traits<Hola>::value_type& e) const {
return e;
}
}
%}