[C++-sig] Re: extract<const char *>

David Abrahams dave at boost-consulting.com
Thu Dec 18 22:11:54 CET 2003


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

> On 18 Dec 2003 at 13:32, David Abrahams wrote:
>
>> > Where does extract<> store its result?
>> 
>> It doesn't.  You're getting the char const* out of the temporary
>> Python string you created.  This is the same as the "attempt to return
>> a dangling reference" issue.  If you want something that will stick
>> around, extract std::string.
>
> Would there be any reason why trying to extract to a FXString (which 
> I have previously registered a converter for and it all works fine) 
> gives a converter not found error?

If that happens, there's a reason, but I'm not sure what it is
offhand.

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





More information about the Cplusplus-sig mailing list