struct Solution {
double power_peak;
valarray<int> assignment;
};
list<Solution> list;
list.pop_back();
list<Solutions *> list2;
list2.pop_back();
function(list2);
Hello i still don't understand how these containers work with respect to their content. Assume they get filled before. When i call pop_back on the first list. i assume everything gets destroyed (including the int's in the Valarray) When i call pop_back on the second list. the content will still live.
When i do a function call. Does the list behave like a pointer to an array? so only the pointer is copied but they still point to the same content.
Is this correct?
Would a vector or valarray behave other in terms of copying?