c++ - Can a container of pointers be deep copied without explicity iterating over every element? -


this question nicely addresses deep copy of pointer (in case smart pointer type), , this question addresses deep copy of container loop.

is there way perform deep copy of container without explicitly iterating on every element?

for example, if have std::vector<std::shared_ptr<myobj>> original , want copy entire container, duplicating each pointer new std::vector<std::shared_ptr<myobj>> copied contains pointers copies of each of myobj elements original.


Comments

Popular posts from this blog

html - How to custom Bootstrap grid height? -

javascript - pass values from mssql to views in node -

image - python get coordinates (pixels) of corresponding points from clicks -