gpt4 book ai didi

c++ - 并行性扩展是否可用于新的 C++17 标准?

转载 作者:行者123 更新时间:2023-11-30 02:22:48 25 4
gpt4 key购买 nike

首先,这个 post 中列出了 C++17 的变化。 .今天我下载了 clang 以检查它是否适用于 C++17(因为 gcc 尚未实现所有内容),并且 here你可以阅读:

Clang 5 and later implement all the features of the C++ 2017 Draft International Standard.

You can use Clang in C++17 mode with the -std=c++17 option (use -std=c++1z in Clang 4 and earlier).

然后,我假设C++17的所有特性都已经添加到clang 5.0中,但是检查了所有这些,我找不到STL算法的并行性扩展等等。我尝试添加标题 <execution>测试新功能,但似乎没有任何效果。

我怀疑这个功能“可能”不可用,但我不确定,因为几乎没有关于它的信息。

我认为英特尔在其编译器中实现了一些东西,但由于我使用的是 Linux,所以我并不是很喜欢它。

最佳答案

Are extensions for parallelism going to be available for the new C++17 Standard?

是的,extensions for parallelism已合并到 ISO C++ 标准中。


Clang 5 and later implement all the features of the C++ 2017 Draft International Standard.

这似乎仅指核心语言特性。您可能想要检查 libc++ 和/或 libstdc++ 一致性状态。

在上面的链接中,P0024未标记为已实现。

关于c++ - 并行性扩展是否可用于新的 C++17 标准?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46908798/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com