C++11 alias templates seg fault fix
Segfault fix when using alias templates, reported by Pierre-Henri Wuillemin
This commit is contained in:
parent
6624f66af5
commit
b175df4e5f
2 changed files with 11 additions and 3 deletions
|
|
@ -2,6 +2,7 @@
|
|||
%module cpp11_template_typedefs
|
||||
|
||||
%warnfilter(SWIGWARN_CPP11_ALIAS_TEMPLATE) TypedefName;
|
||||
%warnfilter(SWIGWARN_CPP11_ALIAS_TEMPLATE) MyIntKeyClass;
|
||||
%warnfilter(SWIGWARN_CPP11_ALIAS_DECLARATION) PF;
|
||||
|
||||
%inline %{
|
||||
|
|
@ -19,5 +20,13 @@ using TypedefName = SomeType<char*, T2, 5>;
|
|||
// type aliasing
|
||||
typedef void (*PFD)(double); // Old style
|
||||
using PF = void (*)(double); // New introduced syntax
|
||||
|
||||
|
||||
// use of template aliasing
|
||||
template<typename Key,typename Val>
|
||||
class MyCPP11Class {
|
||||
};
|
||||
template<typename VAL> using MyIntKeyClass = MyCPP11Class<int,VAL>;
|
||||
MyIntKeyClass<char> intchar;
|
||||
%}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue