fix problem with template + classforward + default template parameters reported by Bill Spotz
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8494 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
a6e348b846
commit
b54c5bdec5
2 changed files with 44 additions and 0 deletions
|
|
@ -18,3 +18,40 @@ namespace foo {
|
|||
}
|
||||
}
|
||||
%}
|
||||
|
||||
|
||||
|
||||
%inline {
|
||||
// Forward declarations
|
||||
template<class RangeScalar, class DomainScalar = RangeScalar> class LinearOpBase;
|
||||
template<class Scalar> class VectorBase;
|
||||
}
|
||||
|
||||
|
||||
%inline {
|
||||
// Class Describable
|
||||
class Describable {
|
||||
public:
|
||||
};
|
||||
|
||||
// Class LinearOpBase
|
||||
template<class RangeScalar, class DomainScalar>
|
||||
class LinearOpBase : virtual public Describable {
|
||||
public:
|
||||
}; // end class LinearOpBase<RangeScalar,DomainScalar>
|
||||
|
||||
// Class VectorBase
|
||||
template<class Scalar>
|
||||
class VectorBase : virtual public LinearOpBase<Scalar>
|
||||
{
|
||||
public:
|
||||
}; // end class VectorBase<Scalar>
|
||||
|
||||
}
|
||||
|
||||
|
||||
%template (LinearOpBase_double) LinearOpBase<double>;
|
||||
%template (VectorBase_double) VectorBase<double>;
|
||||
%template (LinearOpBase_int) LinearOpBase<int,int>;
|
||||
%template (VectorBase_int) VectorBase<int>;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue