Skip to content

[libc++] Make <print> work without deployment target requirement #75225

@ldionne

Description

@ldionne
Member

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.

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)

Activity

changed the title [-]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[/+] on Dec 12, 2023
added
libc++libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.
on Dec 12, 2023
added
formatC++20 std::format or std::print, and anything related to them
and removed on Dec 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

formatC++20 std::format or std::print, and anything related to themlibc++libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

    Development

    Participants

    @ldionne@mordante

    Issue actions

      [libc++] Make <print> work without deployment target requirement · Issue #75225 · llvm/llvm-project