Dear All,
std::vector seems using the copy constructor to allocate memory when
needed. Is it possible to control the memory allocation, such as by
using my own allocator? My question is as follow:
I have a smart pointer my_ptr, and the copy constructor uses deep
copy, however I want it to be shallow copy in std::vector when
reallocate memory. How can I implement it?
This seems a very challenging question as least for me. I appreciate
your kind help.
Best regards,
Tim