Boost logo

Boost Users :

Subject: Re: [Boost-users] [python] Alternative to explicitly defining function pointers?
From: Ravi (lists_ravi_at_[hidden])
Date: 2009-10-12 21:06:23


On Monday 12 October 2009 04:07:26 Boris Schaeling wrote:
> Is it possible to simplify this code without defining a function pointer?

No, but please see recent discussions on cplusplus-sig for ideas for the
future.
 
> -----
> struct X {
> void y(std::string) { }
> std::string y() { return ""; }
> };
>
> std::string (X::*get_y)() = &X::y;
>
> class_<X>("X").add_property("y", get_y);
> -----
>

Regards,
Ravi


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