Set shared_ptr with new_pointer that is old_pointer + offset
问题 Here is a smart pointer: std::shared_ptr<char> p(new char[size]) which represents array filled with raw binary file content. After (and only after) the whole array is copied from file to RAM, I can parse it, and during this I retrieve some header information (a few first dwords). Then actual data follows. Without giving much more context, it's handy for me to to set mentioned shared pointer to new address that is beginning of actual data . This address is still in alocated memory. But how to