[C++-sig] def_readwrite and custom rvalue converters
David Abrahams
dave at boost-consulting.com
Sun Mar 9 13:30:41 CET 2003
"Ralf W. Grosse-Kunstleve" <rwgk at yahoo.com> writes:
> Hi David,
>
> In December we had a conversation about the interaction of
> def_readonly()/def_readwrite() and my custom rvalue converters
> (container_conversions.h), leading to
>
> TypeError: No Python class registered for C++ class ...
>
> messages. After you gave me some advice I arrived at this
> replacement for def_readwrite():
>
> typedef return_value_policy<return_by_value> rbv;
> // ...
> .add_property("site", make_getter(&w_t::site, rbv()),
> make_setter(&w_t::site))
>
> Is this still the best solution available?
Sorry, I don't remember enough about the problem to be able to say.
--
Dave Abrahams
Boost Consulting
www.boost-consulting.com
More information about the Cplusplus-sig
mailing list