[C++-sig] Re: const char arrays

David Abrahams dave at boost-consulting.com
Tue Aug 5 21:29:46 CEST 2003


"Niall Douglas" <s_sourceforge at nedprod.com> writes:

> On 5 Aug 2003 at 11:47, Ralf W. Grosse-Kunstleve wrote:
>
>> --- David Abrahams <dave at boost-consulting.com> wrote:
>> > "Niall Douglas" <s_sourceforge at nedprod.com> writes:
>> > > Problem is that slot_rvalue_from_python<> in
>> > > builtin_converters.hpp is in an unnamed namespace and so therefore
>> > > is inaccessible to me :(
>> > 
>> > I think you should read up on unnamed namespaces again.  Anyway,
>> > that template is in a source file, for good reason.  It's not for
>> > public consumption.
>
> Is it not better I try to solve problems myself before bothering 
> others? 

Absolutely, and thanks for that.

> I only post here when I really don't know what to do next.

You could make it easier for us to help you by posting small examples
that demonstrate what you're trying to do and what result you expect,
and taking care with the precision of what you write, making sure that
you have supplied enough information.  I spent 5 minutes wondering why
I couldn't find slot_rvalue_from_python in builtin_converters.hpp.  If
you are unable to convert char const* to python a small reproducible
example and a copy of the error message would help.

>> > I suggest you follow the example set in item 2 here:
>> > http://www.boost.org/libs/python/doc/v2/faq.html#question2
>> 
>> You may also like to read the three old messages listed under "Custom
>> rvalue converters" near the top of this page:
>> 
>> http://cci.lbl.gov/~rwgk/boost_python/
>> 
>> In particular, the third link should be highly relevant.
>
> Now /that/ is precisely what I was looking for. Thank you very much!
>
> Could not a new section be opened in the docs called "custom rvalue 
> converters"? It seems a waste of time for me to bash my head against 
> a wall and yours to keep answering the same questions over and over.

Sure, we just need a volunteer to write it <wink>.

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





More information about the Cplusplus-sig mailing list