Dimitrij Mijoski
1616fbaccf
[libc++] Fix checks for terminal and flushes in std::print() ( #70321 )
...
The check whether a stream is associated with a terminal or not and the
flushing of the stream in `std::print()` is needed only on Windows.
Additionally, the correct flush should be used. When `std::print` is
called with a C stream, `std::fflush()` should be used. When it is
called with C++ `ostream`, `ostream::flush()` should be called.
Because POSIX does not have a separate Unicode API for terminal output,
checking for terminal (`isatty`) and flushing is not needed at all.
Moreover, `isatty` has noticeable performance cost.
See also https://wg21.link/LWG4044 .
Fixes #70142
2026-03-12 10:58:36 +01:00
..
2026-03-04 15:57:56 +01:00
2026-01-10 02:31:16 -08:00
2025-12-03 12:23:21 -08:00
2026-03-02 03:00:19 +00:00
2026-03-02 15:38:06 -06:00
2025-12-08 06:06:43 -08:00
2025-12-31 10:02:18 -08:00
2025-12-08 06:06:43 -08:00
2026-02-14 10:50:10 -08:00
2025-12-08 06:06:43 -08:00
2025-12-08 06:06:43 -08:00
2024-06-07 19:02:55 -07:00
2025-12-31 10:02:18 -08:00
2025-12-08 06:06:43 -08:00
2026-02-12 13:19:06 -08:00
2026-02-13 11:34:30 -08:00
2026-02-02 10:36:51 -08:00
2026-01-30 21:05:29 +01:00
2025-12-31 10:02:18 -08:00
2025-12-31 10:49:59 -08:00
2025-01-09 14:10:44 -06:00
2025-12-31 10:49:59 -08:00
2026-01-27 09:03:32 -05:00
2026-02-04 14:26:04 -08:00
2026-02-13 11:33:59 -08:00
2026-01-12 09:54:45 -05:00
2026-02-15 10:12:58 -08:00
2025-12-09 10:14:32 -05:00
2025-12-31 10:49:59 -08:00
2025-12-08 06:06:43 -08:00
2026-03-12 10:58:36 +01:00
2025-12-31 10:02:18 -08:00
2026-01-28 21:48:43 +00:00
2026-02-25 18:36:04 -05:00
2026-02-21 09:28:02 -08:00
2025-12-31 10:49:59 -08:00
2025-12-08 06:06:43 -08:00
2025-12-08 06:06:43 -08:00
2025-12-08 06:06:43 -08:00
2026-02-13 11:33:59 -08:00
2026-02-13 11:33:59 -08:00
2025-12-31 10:49:59 -08:00
2025-12-31 10:49:59 -08:00
2026-02-13 11:33:59 -08:00
2025-12-31 10:02:18 -08:00
2026-02-12 12:40:13 -08:00
2026-02-24 11:14:54 -08:00
2025-12-15 09:45:28 -08:00
2026-02-13 11:33:59 -08:00
2026-02-04 14:36:41 -08:00
2026-02-14 05:50:49 -08:00
2026-02-12 15:01:44 -08:00
2025-12-08 06:06:43 -08:00
2026-01-10 01:10:33 -08:00
2026-02-12 15:01:44 -08:00
2025-12-31 10:49:59 -08:00
2024-05-04 15:10:12 -07:00
2026-03-03 16:04:47 +00:00
2026-03-06 15:19:09 +00:00
2025-12-31 10:02:18 -08:00
2024-01-25 13:31:54 -08:00
2025-12-08 06:06:43 -08:00