Skip to content
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

Added workaround for old xcode compiler bug #3716

Merged
merged 2 commits into from
Nov 15, 2023

Conversation

kuguma
Copy link
Contributor

@kuguma kuguma commented Nov 15, 2023

Older xcode (at least xcode12) had a bug that defined macros for __cpp_lib_filesystem and __cpp_lib_variant even if the target did not support it.
When building for a target lower than macOS 10.15 with c++17, fmtlib compilation failed. (https://developer.apple.com/xcode/cpp/#c++17)

As a workaround, I would like to add a flag to disable std::filesystem and std::variant.

This problem seems to have been fixed in the latest xcode15, but I don't think version checking is practical.

Similar issues in other projects: ToruNiina/toml11#150

include/fmt/std.h Outdated Show resolved Hide resolved
@vitaut vitaut merged commit 45e124e into fmtlib:master Nov 15, 2023
40 checks passed
@vitaut
Copy link
Contributor

vitaut commented Nov 15, 2023

Thank you

happymonkey1 pushed a commit to happymonkey1/fmt that referenced this pull request Apr 7, 2024
* Added macros to disable std::filesystem and std::variant as a workaround for old xcode bugs

* Change macro to positive logic
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants