macOS Clang C++17 filesystem header not found
Solution 1:
Libc++, which is the C++ standard library on OS X, has not moved <experimental/filesystem>
to <filesystem>
yet because the specification is not stable.
Hopefully <filesystem>
will be a part of the Clang 6.0 release. (We missed 5.0)
Solution 2:
Xcode 11 Beta now includes <filesystem>
. Unlike the other answers indicating beta support in Xcode 10, Apple has mentioned this in the release notes.
Also mentioned in the release notes, is this is only supported by iOS 13, macOS 10.15, watchOS 6, and tvOS 13. You will only be able to use std::filesystem
for projects targeting these versions or later.