Boost logo

Boost Users :

Subject: Re: [Boost-users] [python][lambda] thin wrapper functions using boost.lambda
From: Nat Goodspeed (nat_at_[hidden])
Date: 2009-07-20 08:34:16


Vaclav Smilauer wrote:

> I should have been clearer why I need that: for properties (for class methods,
> they can be wrapped directly using just &A::meth1). So an example like this
> would be more appropriate:
>
> struct A{ int num1; };
> [...]
> python::class_<A>("A").add_property("num1",lambda::bind(&A::num1,_1));
>
> which fails again. How can I access the num1, besides creating separate function?

http://www.boost.org/doc/libs/1_39_0/libs/python/doc/tutorial/doc/html/python/exposing.html#python.class_data_members


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net