Dan*_*oom 5 c++ macos osx-lion libc++ c++14
I'm updating a project to use the latest Qt and taking the opportunity to switch to libc++ and C++11 at the same time. My understanding is that OS X 10.7 and above support this without me needing to ship my own build of the standard library. I'm happy to no longer support OS X versions <10.7.
C ++ 11支持很棒,但是我真的很想使用C ++ 14。
为OS X> 10.7的最终用户安装的libc ++是否还支持C ++ 14标准库功能?
我的猜测是“是”,并且操作系统更新在> 10.7中一直保持最新状态-但我一直找不到确切的资料说明这种情况。
可能不会。Apple 于 2012 年 10 月发布了 Mac OS X 10.7 (10.7.5) 的最后一次更新;从那时起,libc++.dylib 不太可能被更新(我能想到的唯一例外是安全问题)
Xcode 附带了一组标头,这些标头会随着您的目标 SDK 的不同而变化;如果您针对特定系统(例如 10.7),您将获得这些标头。
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/比较和的内容/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/也明白我的意思了。
对于仅模板功能,您可以使用来自更高版本的 LLVM 版本的自己的标头集 - 但随后您将承担确保兼容性的负担。