Added support for C++0x rvalue and move semantics.
Added testcase. git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2009-matevz@11450 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
29004c3fcf
commit
a8209bfd68
4 changed files with 58 additions and 3 deletions
23
Examples/test-suite/cpp0x_rvalue_reference.i
Normal file
23
Examples/test-suite/cpp0x_rvalue_reference.i
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
%module cpp0x_rvalue_reference
|
||||
|
||||
%inline %{
|
||||
class A {
|
||||
public:
|
||||
int getAcopy() { return _a; }
|
||||
int *getAptr() { return &_a; }
|
||||
int &getAref() { return _a; }
|
||||
int &&getAmove() { return _a; }
|
||||
|
||||
void setAcopy(int a) { _a = a; }
|
||||
void setAptr(int *a) { _a = *a; }
|
||||
void setAref(int &a) { _a = a; }
|
||||
void setAmove(int &&a) { _a = a; }
|
||||
|
||||
void arg(int a);
|
||||
void arg(int *a);
|
||||
void arg(int &a);
|
||||
// void arg(int &&a); // redefinition not allowed
|
||||
private:
|
||||
int _a;
|
||||
};
|
||||
%}
|
||||
Loading…
Add table
Add a link
Reference in a new issue