I have two C ++ lists, std::list<T> List1 and std::list<T*> List2; . Now I would like to do the following operation several times:
List1.push_back(new_object); List2.push_back(&List1.back());
My question is: is the link stored in List2 after each step? Ie: Does the first item in List2 still refer to the first in List1, etc.?
source share