Re: Re: [libxml++] NodeList problem.



> It will be error if you use (as you did) reference to NodeList. You 
> wrote the code like this:
> 
> const xmlpp::Node::NodeList& m_nodeList = root->get_children();
> 

Even if I call the function like so:

    root->get_children().begin() I get the violation. And no, if I reference to the list, it is not invalid and .begin() should still be callable. It is the deferenceing it that will call the problem. The reference is the same as making a nodelist pointer that points to root->get_children() and calling ->begin() on it. I don't see how that should invalidate anything. 





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