使用 C++17 std::filesystem 是否需要 MacOS 10.15? (Xcode 11.1)

Does use of C++17 std::filesystem REQUIRE MacOS 10.15? (Xcode 11.1)

使用 Xcode 11.1,在 MacOS 10.14.6 (Mojave) 上构建,以下行:

#include <filesystem>
typedef std::filesystem::path my_path;

...生成此编译器错误:

'path' is unavailable: introduced in macOS 10.15

这是否意味着我无法从 10.14 开始为早期版本的 MacOS(10.13、10.14)构建,或者我无法从 10.15 生成可以 target/run 在以下 MacOS 版本上的可执行文件早于 10.15?

这意味着(使用 Apple 的 tools/libraries),您不能在针对 10.15 之前的 Mac OS 版本的项目中使用 std::filesystem

如果您有足够新的 Xcode,等等,您应该能够在 10.14(比如说)上构建一个针对 10.15 并使用 filesystem 类型和调用的项目。但不会 运行 10.14.