At my company, we recently switched from VC9 to VC10.
We transferred our projects, but then the person in charge told us that for some time we would need to use some basic DLLs compiled with VC9 on our production machines.
These DLLs use custom structures, some of which contain std::vector, std::mapand so on. Now it occurred to me that the size of the standard containers had changed: some became larger, some became smaller. As a result, the dimensions of our custom structures have changed.
To solve the problems caused by resizing, my colleague thought about artificially increasing the size of our structures, to make it possible to compensate for the resizing of future members, so that the structures remain the same size, regardless of the time we use, preventing damage to the stack when called functions.
Personally, I feel that this “solution” is terrible, because while size matters, so is the layout of the structures. For me, increasing the memory capacity of all structures to eliminate organizational problems seems really wrong.
To do this briefly, my question is: is it possible to simultaneously use two different versions at the same time (using the described trick or any other trick) when using non-C types in function prototypes? Do you have good / bad experience regarding a similar situation?
source
share