如何在 xcode 13 中使用 c++20 <ranges>?

Joh*_*hou 7 c++ xcode c++20

我正在尝试在 Xcode 13.1 中使用 c++20 库

#include <ranges>
Run Code Online (Sandbox Code Playgroud)

我已设置Apple Clang - Languages - C++-std=c++20编译器默认值,但它仍然抛出'ranges' file not found.

BoP*_*BoP 6

根据这个功能列表

https://en.cppreference.com/w/cpp/compiler_support/20

Clang 13 声称“部分”支持,而 Apple Clang 似乎没有。

(不要被版本号混淆。Apple 13.1 不必晚于 LLVM 13.0)。

  • Apple Clang 和 LLVM Clang 基于相同的代码库,但它们在不同时间发布(例如新操作系统发布时),并且具有单独的版本号系统。 (2认同)