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

to_chars: migrating from custom switch to __cpp_lib_to_chars #118

Merged
merged 25 commits into from
Jun 26, 2024

Conversation

fosterbrereton
Copy link
Member

@fosterbrereton fosterbrereton commented Jun 25, 2024

Previously the flag ADOBE_HAS_TO_CHARS_FP was derived from the existence (or lack) of a macOS-dependent preprocessor macro, which turned out to be flaky for the purposes of deciding if to_chars is available for use or not.

This PR instead switches the check to use the more standard defined(__cpp_lib_to_chars) >= 201611L. All checks of this switch have also been moved to source files to eliminate ODR violations. I commandeered the defunct string.cpp file to be the home of the to_string implementation.

@fosterbrereton fosterbrereton force-pushed the fosterbrereton/to_string-take-3 branch from 97ca8b0 to 8ef42e6 Compare June 25, 2024 17:55
@fosterbrereton
Copy link
Member Author

Tests are finally passing on all platforms. @sean-parent and @camio this one is ready for review.

@fosterbrereton fosterbrereton changed the title Migrating from custom switch to __cpp_lib_to_chars to_chars: migrating from custom switch to __cpp_lib_to_chars Jun 26, 2024
@@ -1,39 +1,21 @@
{
"name": "adobe-source-libraries",
"version": "1.0.45",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does that version number need to be updated when we do a release? Is that document?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have no idea. I took that line verbatim from what's in main today. I'd ask @camio for details there.

Copy link
Member

@sean-parent sean-parent left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - question about updating the vcpkg version but that is unrelated to this PR.

@sean-parent sean-parent merged commit 3aa30e9 into main Jun 26, 2024
5 checks passed
@sean-parent sean-parent deleted the fosterbrereton/to_string-take-3 branch June 26, 2024 18:32
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