Question

Are there any explicit compatibility guarantees that boost::interprocess::managed_shared_memory would work across different boost versions? I'm planning to use it to share an integer or ten between multiple processes (which will essentially act as revision numbers for a piece of data they all read and some write). The processes are released separately and end-of-lifed once in a while.

The question is: am I locking myself down to a given version of boost for eternity because managed_shared_memory from 1.51 won't be able to talk with managed_shared_memory from 1.44 and so on?

Was it helpful?

Solution

According to the Boost FAQ :

How can the Boost libraries be used successfully for important projects?

Many of the Boost libraries are actively maintained and improved, so backward compatibility with prior version isn't always possible. Deal with this by freezing the version of the Boost libraries used by your project. Only upgrade at points in your project's life cycle where a bit of change will not cause problems. Individual bug fixes can always be obtained from the boost repository.

So it seems you are locking yourself to a set of future versions of Boost Interprocess that will be compatible with the version you will use, which is an unpredictable number of versions (compatibility could be broken tomorrow as well as it could be never broken).

If you can afford to invest some time to improve your code when a new version of boost comes and breaks compatibility, you are all fine. In practice i think that is more likely to happen once every few years than once a month, libraries makers tend to take backward compatibility into consideration before publishing updates.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top