Re: [libxml++] parse_stream with auto_ptr



Hi,

Could you post a little program that reproduce your problem ?

2005/10/12, Tobias Grimm <listaccount e-tobi net>:
> Hi!
>
> I try to use the dom parser in the following way:
>
>     ....
>     auto_ptr<istream> xmlStream(new stringstream("<foo/>"));
>     ....

Can you guarantee that the stream is untouch during the "..." ?

>     parser.parse_stream(*xmlStream);
>     ....
>
> But this always causes a segfault. And I have absolutely no idea why.
> This code works:
>
>     ....
>     auto_ptr<istream> xmlStream(new stringstream("<foo/>"));
>     ....
>     stringstream s;
>     s << (*xmlStream).rdbuf();
>     parser.parse_stream(s);
>     ....
>
> Any idea, why parse_stream() doesn't like the auto_ptr?

nope


Christophe




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]