Panos wrote:
I have a simple test case:


class Foo
{
  public:
    const int& getX() const {return x;}
    void setX(const int& x_) {x = x_;}

  private:
    int x;
};


BOOST_PYTHON_MODULE(module)
{
  class_<Foo>("Foo")
    .def("getX", &Foo::getX)
  ;
}


The problem is that I cannot wrap getX and I get a compiler error. How
is it possible to wrap getX WITHOUT changing anything in Foo?

Thanks in advance!


Panos Christopoulos Charitos
www.ancient-ritual.com
www.anki3d.org
_______________________________________________
Cplusplus-sig mailing list
Cplusplus-sig@python.org
http://mail.python.org/mailman/listinfo/cplusplus-sig
Hi!

I totally affiliate myself to this problem.
The only difference is that i do not return a const reference but rather a reference.

So maybe we can find a solution for this together :-)

Greetings!

--
Erik Tuerke
Department of Neurophysics Max-Planck-Institute for Human Cognitive and Brain Sciences
Stephanstrasse 1A
04103 Leipzig
Germany Tel: +49 341 99 40-2440
Email: tue...@cbs.mpg.de
www.cbs.mpg.de


_______________________________________________
Cplusplus-sig mailing list
Cplusplus-sig@python.org
http://mail.python.org/mailman/listinfo/cplusplus-sig

Reply via email to