-
Notifications
You must be signed in to change notification settings - Fork 17
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
variant.h: minor fixes for Darwin #16
Conversation
LGTM, thanks for the PR! |
@jagerman By the way, maybe the code can be fixed instead to be usable on Apple? C++17 is certainly supported and works fine both with GCC and Clang on MacOS, and this includes MacOS at least back to 10.5.8. |
It is sort of supported; the core C++17 language is supported, but there chunks of the stl that are not usable when targeting older versions because of missing features in the system libc++ (which Apple apparently never updates on older macOS releases). Off the top of my head, getting a value out of an For example: #include <filesystem>
int main() {
std::filesystem::path p;
}
|
@jagerman For Clangs, Macports can use a newer |
P. S. Filesystem does require a newer |
Yes; Linux (with gcc) is our primary dev platform. We support anything gcc v8 and up. |
(I have not, however, tested with gcc on macos, so not sure if there are quirks there) |
Sounds good. While 10.5 down are at gcc7 at the moment, I have them using gcc12, and anything 10.6+ use gcc12 (though all Intel and aarch64 default to Clangs, GCC being a default on PowerPC and very old Intel). To test the code (at least a build, to begin with), I just have to comment away a protecting macro, or adjustments elsewhere are required? |
I think that's about it; aside from the workarounds for variant/filesystem there shouldn't be anything macos version or clang-dependent. |
I will try it and let you know then. Thanks. |
@jagerman So I just removed all the dedicated code, leaving
Everything builds neatly, tests pass:
This is on 10.6 on PowerPC :) |
This merely fixes macros in use:
AvailabilityMacros.h
, which is actually available in every macOS.