git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6317 626c5289-ae23-0410-ae9c-e8d60b6d4f22
52 lines
544 B
OpenEdge ABL
52 lines
544 B
OpenEdge ABL
%module template_specialization_defarg
|
|
|
|
%inline %{
|
|
|
|
template <class A, class B = double>
|
|
struct C
|
|
{
|
|
};
|
|
|
|
|
|
template <class BB>
|
|
struct C<int , BB>
|
|
{
|
|
int hi()
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
C(int a)
|
|
{
|
|
}
|
|
|
|
};
|
|
|
|
|
|
template <class BB>
|
|
struct C<double , BB>
|
|
{
|
|
int hello()
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
C(double a)
|
|
{
|
|
}
|
|
|
|
};
|
|
|
|
|
|
%}
|
|
|
|
|
|
//
|
|
// This works fine
|
|
//
|
|
%template(C_i) C<int, double>;
|
|
|
|
//
|
|
// This one fails
|
|
//
|
|
%template(C_d) C<double>;
|