-
Notifications
You must be signed in to change notification settings - Fork 14.9k
Closed
Labels
formatC++20 std::format or std::print, and anything related to themC++20 std::format or std::print, and anything related to themlibc++libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.
Description
In a follow-up, we could use
_LIBCPP_AVAILABILITY_HAS_PRINT
to check whether we have__get_ostream_file
on the current deployment target. If we don't, we could instead assume that!__file
and use__vprint_nonunicode
. That would make this mostly work for older deployment targets, except for theflush
below. But by and far, users could use<print>
on older deployment targets with no issues.We could then even remove the availability annotations on
__vprint_unicode
and others, since they would basically have no deployment target requirements anymore.
Originally posted by @ldionne in #73262 (comment)
Metadata
Metadata
Assignees
Labels
formatC++20 std::format or std::print, and anything related to themC++20 std::format or std::print, and anything related to themlibc++libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.
Type
Projects
Milestone
Relationships
Development
Select code repository
Activity
[-]In a follow-up, we could use `_LIBCPP_AVAILABILITY_HAS_PRINT` to check whether we have `__get_ostream_file` on the current deployment target. If we don't, we could instead assume that `!__file` and use `__vprint_nonunicode`. That would make this *mostly* work for older deployment targets, except for the `flush` below. But by and far, users could use `<print>` on older deployment targets with no issues.[/-][+][libc++] Make <print> work without deployment target requirement[/+][libc++][print] Enables it on Apple backdeployment.
[libc++][print] Enables it on Apple backdeployment. (#76293)
[libc++][print] Enables it on Apple backdeployment. (llvm#76293)
[libc++][print] Enables it on Apple backdeployment. (#76293)