Anything that is not C, resides in different build units (lib/dll/exe) and is interfacing means trouble if they are not built with the same exact settings.
Exact settings in the sense that the objects created in one unit may not safely be passed to a different unit if they do not compile to the same code in both.
Esp. classes from templates fall in this category. Even when they are just inside a header, every compilation unit will have it's own copy of the actual code.