-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
std::filesystem support with polyfill #12104
Comments
Separate, using the wrapper headers? I think I have a mild preference for separate, depending in part on whether the dependency is private (my preference is stronger if it is public).
Agree. |
My WIP uses separate compilation, but without the wrapper headers. By rolling our own presence check, we can avoid all dependency on |
That sounds good to me. |
In #12106 we'll add |
As of #12182, |
We'd like to use
std::filesystem
in lieu ofspruce
.It looks like
std::filesystem
is still onlystd::experimental::filesystem
in Ubuntu 18.04 (Bionic) and macOS Mojave (10.14), but will be non-experimental as of Ubuntu 20.04 and macOS Catalina (10.15).Therefore, my plan would be to use https://github.com/gulrak/filesystem (aka
ghc::filesystem
) as polyfill for OS versions without standard library support, but to use the standard library when available (as we do with, e.g.std::optional
).Once we drop support for Mojave 10.14 (i.e., when 10.16 comes out) such that Bionic is the only straggler, we could image dropping
ghc::filesystem
and usingstd::experimental::filesystem
with-lstdc++fs
if we'd like to lose the extra dependency.The questions for
ghc::filesystem
is whether we compile it as single-header vs separate, and whether we allow it as a public dependency (from h files) or only private like with spruce currently (only from cc files). My current thought is to start with private.WIP at https://github.com/jwnimmer-tri/drake/commits/filesystem
\CC @jamiesnape @EricCousineau-TRI
The text was updated successfully, but these errors were encountered: