Added broken test for template + specialization + defarg
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@4170 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
b940c7ae94
commit
a1e75c1c43
2 changed files with 61 additions and 0 deletions
|
|
@ -46,6 +46,7 @@ CPP_TEST_BROKEN = \
|
|||
abstract_typedef \
|
||||
namespace_nested \
|
||||
template_default_arg \
|
||||
template_specialization_defarg \
|
||||
using_namespace
|
||||
|
||||
CPP_TEST_CASES += $(CPP_TEST_BROKEN)
|
||||
|
|
|
|||
60
SWIG/Examples/test-suite/template_specialization_defarg.i
Normal file
60
SWIG/Examples/test-suite/template_specialization_defarg.i
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
%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 = 0)
|
||||
{
|
||||
}
|
||||
|
||||
protected:
|
||||
C()
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
template <class BB>
|
||||
struct C<double , BB>
|
||||
{
|
||||
int hello()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
C(double a = 0)
|
||||
{
|
||||
}
|
||||
|
||||
protected:
|
||||
C()
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
%}
|
||||
|
||||
|
||||
//
|
||||
// This works fine
|
||||
//
|
||||
%template(C_i) C<int, double>;
|
||||
|
||||
//
|
||||
// This one fails
|
||||
//
|
||||
%template(C_d) C<double>;
|
||||
Loading…
Add table
Add a link
Reference in a new issue