Duplicate class template instantiations via %template changes
Named duplicate class template instantiations now issue a warning and are ignored. Duplicate empty class template instantiations are quietly ignored. The test cases are fixed for this new behaviour. This commit is a pre-requisite for the near future so that the Python builtin wrappers can correctly use the SwigType_namestr function without generating duplicate symbol names.
This commit is contained in:
parent
777fd2c280
commit
4729cf2b1f
16 changed files with 283 additions and 55 deletions
|
|
@ -4,4 +4,15 @@ template<class T> T blah(T x) { };
|
|||
|
||||
%template(iblah) blah<int>;
|
||||
%template(iiblah) blah<int>;
|
||||
// The second %template instantiation above should surely be ignored with a warning, but doesn't atm
|
||||
|
||||
// empty template instantiations for template functions warn (unlike for template classes)
|
||||
%template() blah<double>;
|
||||
%template() blah<double>;
|
||||
%template() blah<double>;
|
||||
|
||||
%template(sblah) blah<short>;
|
||||
%template(sblah) blah<short>;
|
||||
|
||||
%template() blah<const char *>;
|
||||
%template() blah<const char *>;
|
||||
%template(sblah) blah<const char *>;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue