Jean-Marc Lasgouttes a écrit :
"Georg" == Georg Baum <[EMAIL PROTECTED]> writes:

Georg> std::swap copies the two ParagraphLists and therefore also each
Georg> paragraph. That triggers exactly the problem we had with the
Georg> old implementation: par ids are invalidated, and some inset
Georg> pointers in CursorSlices. I don't know where exactly the latter
Georg> happens, but I did not care because it is clear that the
Georg> specialized swap avoids any copying, it simply swaps the
Georg> internal data:

Would there be a way to avoid this problem? I tried to think about how
to make std::swap fail, for example, but I do not know. Or we could
have a std::swap specialization for RandomAccessList. Wouldn't this be
better than a member function?

Yes, one that will use list::splice. I have proposed that many times but no one heard me...

Abdel.

Reply via email to