$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
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