Delegating constructors and inheriting constructors clarification and split of tests
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2009-matevz@13852 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
070bf3cc9e
commit
4db087d81f
5 changed files with 63 additions and 34 deletions
18
Examples/test-suite/cpp0x_inheriting_constructors.i
Normal file
18
Examples/test-suite/cpp0x_inheriting_constructors.i
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
/* This test checks whether SWIG correctly parses the new constructor
|
||||
inheritance.
|
||||
*/
|
||||
%module cpp0x_inheriting_constructors
|
||||
|
||||
%inline %{
|
||||
class BaseClass {
|
||||
private:
|
||||
int _val;
|
||||
public:
|
||||
BaseClass(int iValue) { _val = iValue; }
|
||||
};
|
||||
|
||||
class DerivedClass: public BaseClass {
|
||||
public:
|
||||
using BaseClass::BaseClass; // Adds DerivedClass(int) constructor
|
||||
};
|
||||
%}
|
||||
Loading…
Add table
Add a link
Reference in a new issue