简体   繁体   English

更详细的C ++ 17在GCC中的地位?

[英]More detailed C++17 status in GCC?

Consider the following Minimal Complete: 考虑以下最小完成:

#include <numeric>

int main() {
    std::transform_reduce();
}

An attempt to compile it with GCC 7.2 results in error: 尝试使用GCC 7.2编译它会导致错误:

[bipll@home ~]$ g++ -std=c++17 omg.cpp 
omg.cpp: In function ‘int main()’:
omg.cpp:4:7: error: ‘transform_reduce’ is not a member of ‘std’
  std::transform_reduce();
       ^~~~~~~~~~~~~~~~
[bipll@home ~]$ g++ -v |& tail -1
gcc version 7.2.0 (GCC) 

I have tried to find something related on https://gcc.gnu.org/projects/cxx-status.html but it mostly covers language features and I haven't seen anything on new STL definitions support (sometimes this can be trivially automated, like checking #if __has_include(<execution>) , but <numeric> is an old include and I don't see any clean way to check whether it contains a particular definition). 我试图在https://gcc.gnu.org/projects/cxx-status.html上找到相关内容,但它主要涵盖了语言功能,我还没有看到任何有关新STL定义支持的内容(有时这可以通过自动化,比如检查#if __has_include(<execution>) ,但是<numeric>是一个旧的include,我没有看到任何干净的方法来检查它是否包含特定的定义)。 Aside from scriptedly parsing STL headers, are there any quick info sources on whether something described in current draft has already been implemented? 除了脚本解析STL标头之外,是否有关于当前草案中描述的内容是否已经实现的快速信息来源? and when something else will probably be? 什么时候可能会有什么?

The library (libstdc++) support is documented on a different page: 库(libstdc ++)支持记录在不同的页面上:

https://gcc.gnu.org/onlinedocs/libstdc++/manual/status.html#status.iso.201z https://gcc.gnu.org/onlinedocs/libstdc++/manual/status.html#status.iso.201z

The "Parallelism TS" is still marked as "No", so it's not been implemented yet. “Parallelism TS”仍标记为“No”,因此尚未实现。 It's also not implemented in Clang. 它也没有在Clang中实现。 You can test various compilers here: 你可以在这里测试各种编译器:

https://gcc.godbolt.org https://gcc.godbolt.org

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM