[C++-sig] def_readwrite and custom rvalue converters

David Abrahams dave at boost-consulting.com
Mon Mar 10 13:06:33 CET 2003


"Ralf W. Grosse-Kunstleve" <rwgk at yahoo.com> writes:

> --- David Abrahams <dave at boost-consulting.com> wrote:
>> > Is this still the best solution available?
>> 
>> Sorry, I don't remember enough about the problem to be able to say.
>
> That strongly suggests the answer is "yes."
>
> FWIW: Say you have a custom rvalue converter which converts Python tuples to
> std::vector<int> and a to_python converter for the opposite direction.
> Everything is fine for converting function arguments and return values.
> However, with Boost 1.30.0 def_readonly() and def_readwrite() do not work for
> that std::vector<int>. 

OK, I remember now.  Yes, the answer is still "yes."

> You thought it would be better to handle this situation automatically with some
> "not_exposed_as_class" specialization.

Probably.  It wouldn't be too hard to add something like that which
you could specialize.

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com





More information about the Cplusplus-sig mailing list