Is there any way to tell g++ to enable the new C ++ 11 language features without any changes to the C ++ standard library due to ABI modifications?
Adding the compilation flag -std=c++11 tells g++ to include both the language and library functions, but the object files created in this way cannot be reliably linked to those that used the other -std= parameter. I would like to be able to use language enhancements such as rvalue references, move constructors (for my own classes) and the auto keyword in the code associated with C ++ 03 libraries.
EDIT:
I am interested in enabling g++ to enable its C ++ 11 language features, but I want it to analyze, compile and link the old C ++ 03 libraries. I do not want it to use the version of the standard C ++ 11 library. This means that in my own code I can use the auto , range foreach constructors, rvalue references, etc., but I canβt use the new C ++ 11 features in the standard C ++ library like std::move or extensions rvalue-ref for STL containers. The reason that the C ++ 11 standard library version is not needed is because the layout of the various objects has changed, so it is not valid for linking two object files that expect different versions of the standard library to be in the same binary file.
source share