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

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -