Hi, I would like to know if the "interprocess" library can work with STL packaged with Visual Studio. My current understanding is that "interprocess" uses a modified STL to use shared memory and this is packaged with "interprocess". Since a lot of code we have uses STL from VS (MS Visual Studio), mixing might not be an option. Is there a clean workaround path or is it a known limitation? with best regards, dhruva -- Dhruva Krishnamurthy Contents reflect my personal views only!
dhruva wrote:
I would like to know if the "interprocess" library can work with STL packaged with Visual Studio. My current understanding is that "interprocess" uses a modified STL to use shared memory and this is packaged with "interprocess".
I do not believe any version of MSVC supports containers over shared memory. The only compiler I'm aware of that might work is GCC with libstdc++-v3.
Since a lot of code we have uses STL from VS (MS Visual Studio), mixing might not be an option. Is there a clean workaround path or is it a known limitation?
The Interprocess containers should be clean replacements. The easy way to do the replacement is to just search the boost::interprocess:: namespace rather than the std:: namespace, such as with a namespace directive: using namespace boost::interprocess; Or if you've explicitly qualified your containers as, for example, std::vector<T>, just change the std:: to boost::interprocess::. You'll need to change the definition anyway because you need to change the allocator type. And the bad news is that changing the allocator type will make the container types incompatible with containers that use the standard allocator anyway. Eg, you can't do: normal_string = shared_string, even if they're both templates of std::basic_string, if the template parameters are different.
participants (2)
-
Aaron W. LaFramboise
-
dhruva