C++03 library with C++11 source code

前端 未结 2 2099
傲寒
傲寒 2020-12-15 10:10

If I have library that was written in C++03 and I compile it to a static library, can I then use it in C++11? Also is the reverse possible ( C++11 static library with C++03

2条回答
  •  爱一瞬间的悲伤
    2020-12-15 10:43

    Depends on the compiler. GCC, for example, mangles the identifiers whose ABI changed in C++11 differently in C++11 mode. So, for example, if you don't use things such as std::list, then you're fine.

提交回复
热议问题