I have a simple structure:
struct MyType
{
std::string name;
std::string description;
}
and I put it in shared memory:
managed_shared_memory sharedMemory(open_or_create, "name", 65535);
MyType* pType = sharedMemory.construct<MyType>("myType")();
If two applications that interact with shared memory are built using a different version of Visual Studio (a different version of the stl implementation), should I put my own types in shared memory (like char *) instead of stl types?
Edit :
I tried using
typedef boost::interprocess::basic_string<char> shared_string;
and it works!
source
share