I am writing a library that must depend libraries that are not presently compiling with support for the new standard. I would like to compile a library which must depend on those libraries with std=c++0x. Are there any problems with doing this?
If you mix libraries compiled with different compiler options then you must ensure that the ABI for the data types in the interface is the same. Some data types (such as std::string
) have different interfaces and requirements between C++03 and C++0x, so interfaces that use them must be careful.
If your interfaces only use built-in types and your own classes, and these do not themselves use any standard library classes then all should be OK. Otherwise you will need to check the specific subset you are using.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With