What is the best way to remove an element from std::list in c++ and place it at the end given an iterator to the current element and the list of course.
This is what I have written now and I am not sure is the best/ correct way of doing it:
void MyClass::update(std::list<T> * memSegs, std::list<T>::iterator it){
memSegs -> splice(
memSegs -> end(),
*memSegs,
it
);
}