[libcxx-commits] [PATCH] D59093: [libc++] Mark <filesystem> as unavailable on Apple platforms
Louis Dionne via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Mar 11 09:54:36 PDT 2019
ldionne added a comment.
With the new patch (which removes markup from unnecessary methods and classes), I think this is actually the right approach. Using an attribute wouldn't buy us very much as we'd have to close the namespace, push the pragma, open the namespace and then close it again to pop the pragma. And the only set of declarations this would cleanly apply to is the set of operations on `path`. So I think this is as simple as we can get now.
Now, I understand folks don't like availability markup (and markup in general). I share that distaste because it clutters the source code. So I would encourage us to work on a better general solution if we can find one:
- maybe the markup can somehow be stored externally to the library?
- maybe we can automatically derive the list of declarations in the compiler by knowing what symbols were added and when?
- maybe it's easy to write an external tool to check this instead of having it in the library?
However, we shouldn't stop progress on putting `<filesystem>` into the dylib while we're waiting for a better general solution to this problem. Once/if we have such a solution, we can come back and apply it throughout the library (`<variant>`, `<optional>` & friends would also benefit).
CHANGES SINCE LAST ACTION
More information about the libcxx-commits