我如何判断哪个版本的 g++ 是使用“原子”而不是“cstdatomic”的最早版本
How do I tell which version of g++ is the earliest version that uses `atomic` instead of `cstdatomic`?
我有一个运行g++ 4.4.7
的系统,只支持#include <cstdatomic>
。我有另一个运行g++ 4.9.1
的系统,仅支持#include <atomic>
.
如何在不构建所有编译器并进行手动搜索的情况下发现仅支持 <atomic>
的最早版本的 g++
,或者相反,g++
的最新版本支持 <cstdatomic>
?
更广泛地说,如何回答任意系统标头 X 的此问题?
有一个 gcc git 镜像,我会在其中寻找这些东西。 <cstdatomic>
于 2008 年 4 月首次出现,并于 2009 年 12 月通过此提交消失。据我所知,<atomic>
出现在同一个提交中。查看标签,后者大约是 gcc 4.5 发布的时间,果然,浏览源代码树,<cstdatomic>
4.5 消失了(但在后来的 4.4 版本中保留了),<atomic>
出现在它的位置。
附录:在源代码树中查找的位置是libstdc++v3/include/
。 <cstdatomic>
在c_global
,<atomic>
在std
。
更广泛地说,如何回答任意系统标头 X 的此问题?
Wintermute显示了最可靠的方法,但您也可以查看发行说明:
https://gcc.gnu.org/gcc-4.4/changes.html#cplusplus
https://gcc.gnu.org/gcc-4.5/changes.html#cplusplus
https://gcc.gnu.org/gcc-4.6/changes.html#cplusplus
https://gcc.gnu.org/gcc-4.7/changes.html#cxx
https://gcc.gnu.org/gcc-4.8/changes.html#cxx
https://gcc.gnu.org/gcc-4.9/changes.html#cxxhttps://gcc.gnu.org/gcc-5/changes.html#cxx
它们并不总是列出所有更改,但它可能比在源存储库中探索要快得多。
- 为cl.exe(Visual Studio代码)指定命令行C++版本
- 导入库可以跨dll版本工作吗
- 在调用FreeLibrary后,释放动态链接到具有相同版本的CRT堆的DLL的内存
- 在clang++预处理器中确定gcc工具链版本
- 码头化的C++应用程序是否向后兼容早期的内核版本
- 不同的Visual Studio版本中缺少.dll
- 用符号版本替换对函数的所有调用
- luaL_dofile在已知良好的字节码上失败,可以使用未编译的版本
- 正在解码MSVC 32位版本的程序集(作业).没有手术做什么
- 我需要分发哪些版本的可再分发文件
- CV_OCL_RUN宏如何在OpenCV(版本3.4.5)的goodFeaturesToTrack实现中工作?
- 在运行时读取 libstdc++ 版本
- 如何声明一个可以在整个程序中使用的全局 2d 3d 4d .. 数组(堆版本)变量?
- FindPackageHandleStandardArgs.cmake:137 的 CMake 错误(消息):找不到 Boost (缺少:正则表达式)(找到合适的版本"1.72.0",
- Vulkan SDK 版本 1.1.85.0 在 Kubuntu 18.10 上链接
- 如何正确实现与基类不同的版本?
- 从预处理器获取 Windows 版本(C++ Win32)
- 表达式 SFINAE:如何根据类型是否包含具有一个或多个参数的函数来选择模板版本
- 如何在C++中将 Python 字符串转换为其转义版本?
- 我如何判断哪个版本的 g++ 是使用“原子”而不是“cstdatomic”的最早版本