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
|
|
@ -97,6 +97,7 @@ namespace Space {
|
|||
|
||||
|
||||
%warnfilter(SWIGWARN_PARSE_REDEFINED) Space::Duplicate2;
|
||||
%warnfilter(SWIGWARN_TYPE_REDEFINED) Space::Duplicate2;
|
||||
%inline %{
|
||||
namespace Space {
|
||||
template <int I> struct Duplicate2 { void n(){}; };
|
||||
|
|
@ -107,6 +108,7 @@ namespace Space {
|
|||
|
||||
|
||||
%warnfilter(SWIGWARN_PARSE_REDEFINED) Space::Duplicate3;
|
||||
%warnfilter(SWIGWARN_TYPE_REDEFINED) Space::Duplicate3;
|
||||
%inline %{
|
||||
namespace Space {
|
||||
template <int I> struct Duplicate3 { void n(){}; };
|
||||
|
|
@ -123,6 +125,7 @@ namespace Space {
|
|||
%}
|
||||
|
||||
%warnfilter(SWIGWARN_PARSE_REDEFINED) Space::Duplicate4;
|
||||
%warnfilter(SWIGWARN_TYPE_REDEFINED) Space::Duplicate4<0>;
|
||||
namespace Space {
|
||||
template <bool B> struct Duplicate4 { void ff(){}; };
|
||||
template <bool B> struct Duplicate4 { void ff(){}; };
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue