Fixes inheritance hierarchies more than two deep and the using
declarations are overloaded. Using declarations
from a base class' base were not available for use in the target
language. For example in the code below, Using1::usingmethod(int i)
was not wrapped for use in Using3:
struct Using1 {
protected:
void usingmethod(int i) {}
};
struct Using2 : Using1 {
protected:
void usingmethod(int i, int j) {}
using Using1::usingmethod;
};
struct Using3 : Using2 {
void usingmethod(int i, int j, int k) {}
using Using2::usingmethod;
};
Similarly for C++11 using declarations for inheriting constructors.
Recent commits for internal constructor and destructor names resulted
in destructors declared with template parameters being ignored
with warnings like:
Illegal destructor name TemplPublicBase6< int >::~TemplPublicBase6(). Ignored.
Although declaring constructors and destructors with template parameters
are rejected by modern compilers and C++20, SWIG continues to support it.
Make sure the name stored in the parse tree is the C++20 compliant name
name, that is, without the template parameters.
Fixes using declarations for templated constructors declared with
template parameters, was warning with:
Nothing known about 'TemplPublicBase6< int >::TemplPublicBase6'.
Parser no longer checks for a declared constructor when handling a
using declaration in order to correct the name as it won't find
implicitly declared constructors. Now it checks that a using
declaration is for something that looks like a constructor instead
by checking the immediate base classes for allowed constructors.
Internal using name no longer contains template parameters.
Fixes symbol table lookup for non-instantiated template constructor.
Builds on previous few commits where the internal name no longer
contains the template parameters for constructors and destructors.