mercredi 28 janvier 2015

C++11 compatibility with existing libraries/frameworks

I am wondering something for which I have not found a convincing answer yet.


Situation:



  • A system with some libraries (e.g. gtkmm) compiled without c++11 enabled.

  • An application compiled with C++11 enabled.

  • Both are compiled and linked with the same GCC version/environment.

  • The application has some function calls to the library which use std::string and std::vector.


both std::string and std::vector support move semantics which most likely mean they are not binary compatible with wth non C++11 variants. However both the application and library are build with the same compiler and standard libraries, so it would not be so strange if the lib would recognize this and support it.


Is the above situation safe, or would it be really required to compile everything with the C++11 flag, even if the same build environment is used ?


Aucun commentaire:

Enregistrer un commentaire