I have a very complicated class(it has unordered_map and so on on inside it) and I want to share an object of it withit two my processes. Can I simply pass just a pointer to it from one process to another? I think, no, but hope to hear “Yes!”.
If “no”, I’d be grateful to see any links how to cope in such cases.
I need to have only one instance of this object for all processes because it’s very large and all of the processes will work woth it for read only.
No, process do not (naturally) share memory. If boost is an option, so you can have a look on Boost.Interprocess for easy memory sharing.