mirror of https://github.com/swig/swig
parent
eec306c228
commit
ee35389d22
|
@ -5,6 +5,10 @@ See the RELEASENOTES file for a summary of changes in each release.
|
|||
Version 3.0.3 (in progress)
|
||||
===========================
|
||||
|
||||
2014-12-27: wsfulton
|
||||
Fix #280 - abort using all default template parameters within other template
|
||||
parameters.
|
||||
|
||||
2014-12-27: talby
|
||||
[Perl] Issue #282 perl5 archlib vs archlibexp
|
||||
[Perl] tidy "warning: duplicate 'extern' declaration specifier" when building generated code under clang
|
||||
|
|
|
@ -45,6 +45,11 @@ public class template_default_class_parms_runme {
|
|||
foo.setTType(a);
|
||||
a = foo.method(a);
|
||||
}
|
||||
|
||||
{
|
||||
MapDefaults md = new MapDefaults();
|
||||
md.test_func(10, 20, new DefaultNodeType());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -31,3 +31,46 @@ namespace Space {
|
|||
%template(FooAnotherType) Space::Foo<Space::AnotherType>;
|
||||
|
||||
%template() Space::ATemplate<>;
|
||||
|
||||
|
||||
// Github issue #280 segfault
|
||||
%inline %{
|
||||
namespace Teuchos {
|
||||
class Describable {};
|
||||
}
|
||||
namespace KokkosClassic {
|
||||
namespace DefaultNode {
|
||||
struct DefaultNodeType {};
|
||||
};
|
||||
}
|
||||
|
||||
namespace Tpetra {
|
||||
template <class LocalOrdinal = int,
|
||||
class GlobalOrdinal = LocalOrdinal,
|
||||
class Node = KokkosClassic::DefaultNode::DefaultNodeType>
|
||||
class Map : public Teuchos::Describable {
|
||||
public:
|
||||
typedef LocalOrdinal local_ordinal_type;
|
||||
typedef GlobalOrdinal global_ordinal_type;
|
||||
typedef Node node_type;
|
||||
void test_func(LocalOrdinal, GlobalOrdinal, Node) {}
|
||||
};
|
||||
}
|
||||
%}
|
||||
|
||||
%template(MapDefaults) Tpetra::Map<>;
|
||||
|
||||
%inline %{
|
||||
namespace Details {
|
||||
template < class LO = ::Tpetra::Map<>::local_ordinal_type,
|
||||
class GO = typename ::Tpetra::Map<LO>::global_ordinal_type,
|
||||
class NT = typename ::Tpetra::Map<LO, GO>::node_type >
|
||||
class Transfer : public Teuchos::Describable {
|
||||
public:
|
||||
void transfer_func(LO, GO, NT) {}
|
||||
};
|
||||
}
|
||||
%}
|
||||
|
||||
// Below is not resolving correctly yet
|
||||
%template(TransferDefaults) Details::Transfer<>;
|
||||
|
|
|
@ -1875,15 +1875,15 @@ ParmList *Swig_symbol_template_defargs(Parm *parms, Parm *targs, Symtab *tscope,
|
|||
Delete(ntq);
|
||||
ntq = ty;
|
||||
}
|
||||
/* Printf(stderr,"value %s %s %s\n",value,ntr,ntq); */
|
||||
cp = NewParmWithoutFileLineInfo(ntq, 0);
|
||||
if (lp)
|
||||
set_nextSibling(lp, cp);
|
||||
else
|
||||
expandedparms = CopyParm(cp);
|
||||
if (lp) {
|
||||
set_nextSibling(lp, cp);
|
||||
Delete(cp);
|
||||
} else {
|
||||
expandedparms = cp;
|
||||
}
|
||||
lp = cp;
|
||||
tp = nextSibling(tp);
|
||||
Delete(cp);
|
||||
Delete(nt);
|
||||
Delete(ntq);
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue