Smart pointer to %ignored class doesn't expose inherited methods fix.
Regression introduced in swig-3.0.9 by 3efdbc8
Closes #690
This commit is contained in:
parent
8aea57c704
commit
b9ca9f5efc
5 changed files with 58 additions and 3 deletions
33
Examples/test-suite/smart_pointer_ignore.i
Normal file
33
Examples/test-suite/smart_pointer_ignore.i
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
%module smart_pointer_ignore
|
||||
|
||||
|
||||
%ignore Derived;
|
||||
|
||||
%inline %{
|
||||
class Base {
|
||||
public:
|
||||
void base() {}
|
||||
};
|
||||
|
||||
class Derived : public Base {
|
||||
public:
|
||||
void derived() {}
|
||||
};
|
||||
|
||||
template <class T>
|
||||
class Ptr {
|
||||
public:
|
||||
Ptr(T *t) : ptr(t) {}
|
||||
T * operator->() const { return ptr; }
|
||||
private:
|
||||
T *ptr;
|
||||
};
|
||||
%}
|
||||
|
||||
%template(DerivedPtr) Ptr<Derived>;
|
||||
|
||||
%inline %{
|
||||
Ptr<Derived> makeDerived() {
|
||||
return Ptr<Derived>(new Derived());
|
||||
}
|
||||
%}
|
||||
Loading…
Add table
Add a link
Reference in a new issue