Post

Replies

Boosts

Views

Activity

Reply to Xcode does not respect '__builtin_available' availability API
I ran into this too and figured it out. The issue is that the to_chars functions’ availability attributes use the “strict” modifier, which means it isn’t possible to check for them at runtime. From the Clang docs: The flag strict disallows using API when deploying back to a platform version prior to when the declaration was introduced. An attempt to use such API before its introduction causes a hard error. So unfortunately, to use these functions in an app that supports older OSs, you have to use compile-time checks with ifdefs.
Jul ’24
Reply to Xcode does not respect '__builtin_available' availability API
I ran into this too and figured it out. The issue is that the to_chars functions’ availability attributes use the “strict” modifier, which means it isn’t possible to check for them at runtime. From the Clang docs: The flag strict disallows using API when deploying back to a platform version prior to when the declaration was introduced. An attempt to use such API before its introduction causes a hard error. So unfortunately, to use these functions in an app that supports older OSs, you have to use compile-time checks with ifdefs.
Replies
Boosts
Views
Activity
Jul ’24