Skip to content

Sync: fix the macOS build after #325 (floating-point from_chars) - #352

Open
ProgenyAlpha wants to merge 1 commit into
STFC-Mod:devfrom
ProgenyAlpha:fix/mac-float-from-chars
Open

ProgenyAlpha wants to merge 1 commit into
STFC-Mod:devfrom
ProgenyAlpha:fix/mac-float-from-chars

Conversation

@ProgenyAlpha

@ProgenyAlpha ProgenyAlpha commented Oct 27, 2026 •

Copy link
Copy Markdown

The Mac builds on dev fail since #325 was merged (Windows passes):

mods/src/patches/parts/sync.cc:2486:12: error: 'from_chars' is unavailable: introduced in macOS 26.0

number(float) read its to_chars text back with floating-point std::from_chars. libc++ provides that only on macOS 26 and newer, and the build targets macOS 14.6. The integer from_chars from #342 is not affected.

The text is still written with to_chars (shortest form, so 14.364 stays 14.364). It is now read back through an istringstream set to the classic locale, so the output does not change.

Testing: the Windows release build passes. I have no Mac to build or run it on, so whether this fixes the Mac build will only show once CI runs on this PR.

…t from_chars

std::from_chars for double is unavailable before macOS 26 (build-mac failed on dev after STFC-Mod#325).
The shortest float text from to_chars is now read back through a classic-locale stream.
@ProgenyAlpha
ProgenyAlpha force-pushed the fix/mac-float-from-chars branch from b28ee40 to f759a6f Compare October 27, 2026 20:27
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