D
Dennis Jones
Hi,
Is there is a way to *move* elements from one container to another with a
single STL function? That is, can I move an element (or range of elements)
between containers without doing a copy followed by a remove?
I've got two containers (a queue and a list) holding shared_ptr's, and I'd
like to move elements back and forth between them. I only need to move one
element at a time, though I suspect a general solution would also accept a
range.
Thanks,
Dennis
Is there is a way to *move* elements from one container to another with a
single STL function? That is, can I move an element (or range of elements)
between containers without doing a copy followed by a remove?
I've got two containers (a queue and a list) holding shared_ptr's, and I'd
like to move elements back and forth between them. I only need to move one
element at a time, though I suspect a general solution would also accept a
range.
Thanks,
Dennis