parent
eec306c228
commit
ee35389d22
4 changed files with 58 additions and 6 deletions
|
|
@ -5,6 +5,10 @@ See the RELEASENOTES file for a summary of changes in each release.
|
||||||
Version 3.0.3 (in progress)
|
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
|
2014-12-27: talby
|
||||||
[Perl] Issue #282 perl5 archlib vs archlibexp
|
[Perl] Issue #282 perl5 archlib vs archlibexp
|
||||||
[Perl] tidy "warning: duplicate 'extern' declaration specifier" when building generated code under clang
|
[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);
|
foo.setTType(a);
|
||||||
a = foo.method(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(FooAnotherType) Space::Foo<Space::AnotherType>;
|
||||||
|
|
||||||
%template() Space::ATemplate<>;
|
%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);
|
Delete(ntq);
|
||||||
ntq = ty;
|
ntq = ty;
|
||||||
}
|
}
|
||||||
/* Printf(stderr,"value %s %s %s\n",value,ntr,ntq); */
|
|
||||||
cp = NewParmWithoutFileLineInfo(ntq, 0);
|
cp = NewParmWithoutFileLineInfo(ntq, 0);
|
||||||
if (lp)
|
if (lp) {
|
||||||
set_nextSibling(lp, cp);
|
set_nextSibling(lp, cp);
|
||||||
else
|
Delete(cp);
|
||||||
expandedparms = CopyParm(cp);
|
} else {
|
||||||
|
expandedparms = cp;
|
||||||
|
}
|
||||||
lp = cp;
|
lp = cp;
|
||||||
tp = nextSibling(tp);
|
tp = nextSibling(tp);
|
||||||
Delete(cp);
|
|
||||||
Delete(nt);
|
Delete(nt);
|
||||||
Delete(ntq);
|
Delete(ntq);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue