Added broken test for template + specialization + defarg

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@4170 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Marcelo Matus 2002-12-10 23:19:49 +00:00
commit dbf8e12740
2 changed files with 61 additions and 0 deletions

View file

@ -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)

View 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>;