Skip to content

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

Closed
@ldionne

Description

@ldionne

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)

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

No branches or pull requests

Issue actions