Improved C++0x rvalue reference implementation differentiating lvalue and rvalue references. The previous implementation treated rvalue references as lvalue references which leads to a number of different wrapping issues.

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2009-matevz@12160 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2010-07-18 00:19:22 +00:00
commit d8cc75946b
13 changed files with 399 additions and 32 deletions

View file

@ -3,12 +3,13 @@
%module cpp0x_rvalue_reference
%inline %{
#include <utility>
class A {
public:
int getAcopy() { return _a; }
int *getAptr() { return &_a; }
int &getAref() { return _a; }
int &&getAmove() { return _a; }
int &&getAmove() { return std::move(_a); }
void setAcopy(int a) { _a = a; }
void setAptr(int *a) { _a = *a; }