A
Atlas
To swap to nodes in list, changing pointers is enough. But the stl swap
method seems to copy their values, doesn't it?
method seems to copy their values, doesn't it?
Atlas said:To swap to nodes in list, changing pointers is enough. But the stl swap
method seems to copy their values, doesn't it?
Atlas said:To swap to nodes in list, changing pointers is enough. But the stl swap
method seems to copy their values, doesn't it?
John said:std::list have several methods called 'splice' which can move nodes in a
list without copying.
Atlas said:To swap to nodes in list, changing pointers is enough. But the stl swap
method seems to copy their values, doesn't it?
That's not allowed for what he wants to do. A list may not splice()
with itself.
Kristo said:That's not allowed for what he wants to do. A list may not splice()
with itself.
Kristo said:That's not allowed for what he wants to do. A list may not splice()
with itself.
Kristo
John said:There are three different versions of splice. Two of them allow a list
to splice with itself. It all depends on precisely what the OP wants to do.
john
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.