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

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

首先,C++17 的变化列在此 . Today I downloaded clang to check if it was complete for C++17 (as gcc hasn't implemented everything yet), and 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算法的并行性扩展等等。我尝试添加 header <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++ and/or libstdc++ 一致性状态。

在以上链接中,P0024 未标记为已实施。