Skip to content

Commit 2fd4084

Browse files
authored
[libc++][print] Adds ostream overloads. (#73262)
Finishes implementation of - P2093R14 Formatted output - P2539R4 Should the output of std::print to a terminal be synchronized with the underlying stream? Differential Revision: https://reviews.llvm.org/D156609
1 parent dcd7c8b commit 2fd4084

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+3478
-110
lines changed

libcxx/docs/FeatureTestMacroTable.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ Status
344344
--------------------------------------------------- -----------------
345345
``__cpp_lib_out_ptr`` *unimplemented*
346346
--------------------------------------------------- -----------------
347-
``__cpp_lib_print`` *unimplemented*
347+
``__cpp_lib_print`` ``202207L``
348348
--------------------------------------------------- -----------------
349349
``__cpp_lib_ranges_as_const`` *unimplemented*
350350
--------------------------------------------------- -----------------

libcxx/docs/ImplementationDefinedBehavior.rst

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,29 @@ The Standard allows implementations to automatically update the
2828
This offers a way for users to update the *remote time zone database* and
2929
give them full control over the process.
3030

31+
32+
`[ostream.formatted.print]/3 <http://eel.is/c++draft/ostream.formatted.print#3>`_ A terminal capable of displaying Unicode
33+
--------------------------------------------------------------------------------------------------------------------------
34+
35+
The Standard specifies that the manner in which a stream is determined to refer
36+
to a terminal capable of displaying Unicode is implementation-defined. This is
37+
used for ``std::print`` and similar functions taking an ``ostream&`` argument.
38+
39+
Libc++ determines that a stream is Unicode-capable terminal by:
40+
41+
* First it determines whether the stream's ``rdbuf()`` has an underlying
42+
``FILE*``. This is ``true`` in the following cases:
43+
44+
* The stream is ``std::cout``, ``std::cerr``, or ``std::clog``.
45+
46+
* A ``std::basic_filebuf<CharT, Traits>`` derived from ``std::filebuf``.
47+
48+
* The way to determine whether this ``FILE*`` refers to a terminal capable of
49+
displaying Unicode is the same as specified for `void vprint_unicode(FILE*
50+
stream, string_view fmt, format_args args);
51+
<http://eel.is/c++draft/print.fun#7>`_. This function is used for other
52+
``std::print`` overloads that don't take an ``ostream&`` argument.
53+
3154
Listed in the index of implementation-defined behavior
3255
======================================================
3356

libcxx/docs/ReleaseNotes/18.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ What's New in Libc++ 18.0.0?
4141

4242
Implemented Papers
4343
------------------
44+
- P2093R14 Formatted output
45+
- P2539R4 Should the output of ``std::print`` to a terminal be synchronized with the underlying stream?
4446

4547
- P2497R0 - Testing for success or failure of ``<charconv>`` functions
4648
- P2697R1 - Interfacing ``bitset`` with ``string_view``

libcxx/docs/Status/Cxx23Papers.csv

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
"`P1467R9 <https://wg21.link/P1467R9>`__","LWG","Extended ``floating-point`` types and standard names","July 2022","",""
6060
"`P1642R11 <https://wg21.link/P1642R11>`__","LWG","Freestanding ``[utilities]``, ``[ranges]``, and ``[iterators]``","July 2022","",""
6161
"`P1899R3 <https://wg21.link/P1899R3>`__","LWG","``stride_view``","July 2022","","","|ranges|"
62-
"`P2093R14 <https://wg21.link/P2093R14>`__","LWG","Formatted output","July 2022","|In Progress|"
62+
"`P2093R14 <https://wg21.link/P2093R14>`__","LWG","Formatted output","July 2022","","|Complete|","18.0"
6363
"`P2165R4 <https://wg21.link/P2165R4>`__","LWG","Compatibility between ``tuple``, ``pair`` and ``tuple-like`` objects","July 2022","",""
6464
"`P2278R4 <https://wg21.link/P2278R4>`__","LWG","``cbegin`` should always return a constant iterator","July 2022","","","|ranges|"
6565
"`P2286R8 <https://wg21.link/P2286R8>`__","LWG","Formatting Ranges","July 2022","|Complete|","16.0","|format| |ranges|"
@@ -99,7 +99,7 @@
9999
"`P2167R3 <https://wg21.link/P2167R3>`__","LWG", "Improved Proposed Wording for LWG 2114", "November 2022","","",""
100100
"`P2396R1 <https://wg21.link/P2396R1>`__","LWG", "Concurrency TS 2 fixes ", "November 2022","","","|concurrency TS|"
101101
"`P2505R5 <https://wg21.link/P2505R5>`__","LWG", "Monadic Functions for ``std::expected``", "November 2022","|Complete|","17.0",""
102-
"`P2539R4 <https://wg21.link/P2539R4>`__","LWG", "Should the output of ``std::print`` to a terminal be synchronized with the underlying stream?", "November 2022","|In Progress|","","|format|"
102+
"`P2539R4 <https://wg21.link/P2539R4>`__","LWG", "Should the output of ``std::print`` to a terminal be synchronized with the underlying stream?", "November 2022","|Complete|","18.0","|format|"
103103
"`P2602R2 <https://wg21.link/P2602R2>`__","LWG", "Poison Pills are Too Toxic", "November 2022","","","|ranges|"
104104
"`P2708R1 <https://wg21.link/P2708R1>`__","LWG", "No Further Fundamentals TSes", "November 2022","|Nothing to do|","",""
105105
"","","","","","",""

libcxx/docs/Status/FormatIssues.csv

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ Number,Name,Standard,Assignee,Status,First released version
55
`P1868 <https://wg21.link/P1868>`_,"width: clarifying units of width and precision in std::format (Implements the unicode support.)","C++20",Mark de Wever,|Complete|,14.0
66
`P2216 <https://wg21.link/P2216>`_,"std::format improvements","C++20",Mark de Wever,|Complete|,15.0
77
`P2418 <https://wg21.link/P2418>`__,"Add support for ``std::generator``-like types to ``std::format``","C++20",Mark de Wever,|Complete|,15.0
8-
"`P2093R14 <https://wg21.link/P2093R14>`__","Formatted output","C++23",Mark de Wever,|In Progress|
8+
"`P2093R14 <https://wg21.link/P2093R14>`__","Formatted output","C++23",Mark de Wever,|Complete|,"18.0"
99
"`P2286R8 <https://wg21.link/P2286R8>`__","Formatting Ranges","C++23","Mark de Wever","|Complete|",16.0
1010
"`P2508R1 <https://wg21.link/P2508R1>`__","Exposing ``std::basic-format-string``","C++23","Mark de Wever","|Complete|",15.0
1111
"`P2585R0 <https://wg21.link/P2585R0>`__","Improving default container formatting","C++23","Mark de Wever","|Complete|",17.0
12-
"`P2539R4 <https://wg21.link/P2539R4>`__","Should the output of ``std::print`` to a terminal be synchronized with the underlying stream?","C++23","Mark de Wever","|In Progress|"
12+
"`P2539R4 <https://wg21.link/P2539R4>`__","Should the output of ``std::print`` to a terminal be synchronized with the underlying stream?","C++23","Mark de Wever","|Complete|","18.0"
1313
"`P2713R1 <https://wg21.link/P2713R1>`__","Escaping improvements in ``std::format``","C++23","Mark de Wever",""
1414
"`P2675R1 <https://wg21.link/P2675R1>`__","``format``'s width estimation is too approximate and not forward compatible","C++23","Mark de Wever","|Complete|",17.0
1515
"`P2572R1 <https://wg21.link/P2572R1>`__","``std::format`` fill character allowances","C++23","Mark de Wever","|Complete|",17.0

libcxx/docs/Status/FormatPaper.csv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,4 +49,4 @@ Section,Description,Dependencies,Assignee,Status,First released version
4949
"`P2093R14 <https://wg21.link/P2093R14>`__","Formatted output"
5050
`[print.fun] <https://wg21.link/print.fun>`__,"Output to ``stdout``",,Mark de Wever,|Complete|, 17.0
5151
`[print.fun] <https://wg21.link/print.fun>`__,"Output to ``FILE*``",,Mark de Wever,|Complete|, 17.0
52-
`[ostream.formatted.print] <https://wg21.link/ostream.formatted.print>`__,"Output to ``ostream``",,Mark de Wever
52+
`[ostream.formatted.print] <https://wg21.link/ostream.formatted.print>`__,"Output to ``ostream``",,Mark de Wever,|Complete|, 18.0

libcxx/include/__availability

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,12 @@
136136
# define _LIBCPP_AVAILABILITY_HAS_TZDB 1
137137
# define _LIBCPP_AVAILABILITY_TZDB
138138

139+
// This controls the availability of C++23 <print>, which
140+
// has a dependency on the built library (it needs access to
141+
// the underlying buffer types of std::cout, std::cerr, and std::clog.
142+
# define _LIBCPP_AVAILABILITY_HAS_PRINT 1
143+
# define _LIBCPP_AVAILABILITY_PRINT
144+
139145
// Enable additional explicit instantiations of iostreams components. This
140146
// reduces the number of weak definitions generated in programs that use
141147
// iostreams by providing a single strong definition in the shared library.
@@ -258,6 +264,9 @@
258264
# define _LIBCPP_AVAILABILITY_HAS_TZDB 0
259265
# define _LIBCPP_AVAILABILITY_TZDB __attribute__((unavailable))
260266

267+
# define _LIBCPP_AVAILABILITY_HAS_PRINT 0
268+
# define _LIBCPP_AVAILABILITY_PRINT __attribute__((unavailable))
269+
261270
// clang-format off
262271
# if (defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 120000) || \
263272
(defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ < 150000) || \

libcxx/include/fstream

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,8 @@ private:
280280

281281
bool __read_mode();
282282
void __write_mode();
283+
284+
_LIBCPP_EXPORTED_FROM_ABI friend FILE* __get_ostream_file(ostream&);
283285
};
284286

285287
template <class _CharT, class _Traits>

libcxx/include/ostream

Lines changed: 159 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,13 +159,24 @@ basic_ostream<wchar_t, traits>& operator<<(basic_ostream<wchar_t, traits>&, cons
159159
template<class traits>
160160
basic_ostream<wchar_t, traits>& operator<<(basic_ostream<wchar_t, traits>&, const char32_t*) = delete; // since C++20
161161
162+
// [ostream.formatted.print], print functions
163+
template<class... Args> // since C++23
164+
void print(ostream& os, format_string<Args...> fmt, Args&&... args);
165+
template<class... Args> // since C++23
166+
void println(ostream& os, format_string<Args...> fmt, Args&&... args);
167+
168+
void vprint_unicode(ostream& os, string_view fmt, format_args args); // since C++23
169+
void vprint_nonunicode(ostream& os, string_view fmt, format_args args); // since C++23
162170
} // std
163171
164172
*/
165173

166174
#include <__assert> // all public C++ headers provide the assertion handler
175+
#include <__availability>
167176
#include <__config>
168177
#include <__exception/operations.h>
178+
#include <__format/format_args.h>
179+
#include <__format/format_functions.h>
169180
#include <__fwd/ostream.h>
170181
#include <__memory/shared_ptr.h>
171182
#include <__memory/unique_ptr.h>
@@ -176,10 +187,13 @@ basic_ostream<wchar_t, traits>& operator<<(basic_ostream<wchar_t, traits>&, cons
176187
#include <__type_traits/void_t.h>
177188
#include <__utility/declval.h>
178189
#include <bitset>
190+
#include <cstdio>
179191
#include <ios>
180192
#include <locale>
181193
#include <new>
194+
#include <print>
182195
#include <streambuf>
196+
#include <string_view>
183197
#include <version>
184198

185199
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
@@ -1005,6 +1019,151 @@ extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_ostream<char>;
10051019
extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_ostream<wchar_t>;
10061020
#endif
10071021

1022+
#if _LIBCPP_STD_VER >= 23
1023+
1024+
template <class = void> // TODO PRINT template or availability markup fires too eagerly (http://llvm.org/PR61563).
1025+
_LIBCPP_HIDE_FROM_ABI inline void
1026+
__vprint_nonunicode(ostream& __os, string_view __fmt, format_args __args, bool __write_nl) {
1027+
// [ostream.formatted.print]/3
1028+
// Effects: Behaves as a formatted output function
1029+
// ([ostream.formatted.reqmts]) of os, except that:
1030+
// - failure to generate output is reported as specified below, and
1031+
// - any exception thrown by the call to vformat is propagated without regard
1032+
// to the value of os.exceptions() and without turning on ios_base::badbit
1033+
// in the error state of os.
1034+
// After constructing a sentry object, the function initializes an automatic
1035+
// variable via
1036+
// string out = vformat(os.getloc(), fmt, args);
1037+
1038+
ostream::sentry __s(__os);
1039+
if (__s) {
1040+
string __o = std::vformat(__os.getloc(), __fmt, __args);
1041+
if (__write_nl)
1042+
__o += '\n';
1043+
1044+
const char* __str = __o.data();
1045+
size_t __len = __o.size();
1046+
1047+
# ifndef _LIBCPP_HAS_NO_EXCEPTIONS
1048+
try {
1049+
# endif // _LIBCPP_HAS_NO_EXCEPTIONS
1050+
typedef ostreambuf_iterator<char> _Ip;
1051+
if (std::__pad_and_output(
1052+
_Ip(__os),
1053+
__str,
1054+
(__os.flags() & ios_base::adjustfield) == ios_base::left ? __str + __len : __str,
1055+
__str + __len,
1056+
__os,
1057+
__os.fill())
1058+
.failed())
1059+
__os.setstate(ios_base::badbit | ios_base::failbit);
1060+
1061+
# ifndef _LIBCPP_HAS_NO_EXCEPTIONS
1062+
} catch (...) {
1063+
__os.__set_badbit_and_consider_rethrow();
1064+
}
1065+
# endif // _LIBCPP_HAS_NO_EXCEPTIONS
1066+
}
1067+
}
1068+
1069+
template <class = void> // TODO PRINT template or availability markup fires too eagerly (http://llvm.org/PR61563).
1070+
_LIBCPP_HIDE_FROM_ABI inline void vprint_nonunicode(ostream& __os, string_view __fmt, format_args __args) {
1071+
std::__vprint_nonunicode(__os, __fmt, __args, false);
1072+
}
1073+
1074+
// Returns the FILE* associated with the __os.
1075+
// Returns a nullptr when no FILE* is associated with __os.
1076+
// This function is in the dylib since the type of the buffer associated
1077+
// with std::cout, std::cerr, and std::clog is only known in the dylib.
1078+
//
1079+
// This function implements part of the implementation-defined behavior
1080+
// of [ostream.formatted.print]/3
1081+
// If the function is vprint_unicode and os is a stream that refers to
1082+
// a terminal capable of displaying Unicode which is determined in an
1083+
// implementation-defined manner, writes out to the terminal using the
1084+
// native Unicode API;
1085+
// Whether the returned FILE* is "a terminal capable of displaying Unicode"
1086+
// is determined in the same way as the print(FILE*, ...) overloads.
1087+
_LIBCPP_AVAILABILITY_PRINT _LIBCPP_EXPORTED_FROM_ABI FILE* __get_ostream_file(ostream& __os);
1088+
1089+
# ifndef _LIBCPP_HAS_NO_UNICODE
1090+
template <class = void> // TODO PRINT template or availability markup fires too eagerly (http://llvm.org/PR61563).
1091+
_LIBCPP_AVAILABILITY_PRINT _LIBCPP_HIDE_FROM_ABI void
1092+
__vprint_unicode(ostream& __os, string_view __fmt, format_args __args, bool __write_nl) {
1093+
FILE* __file = std::__get_ostream_file(__os);
1094+
if (!__file || !__print::__is_terminal(__file))
1095+
return std::__vprint_nonunicode(__os, __fmt, __args, __write_nl);
1096+
1097+
// [ostream.formatted.print]/3
1098+
// If the function is vprint_unicode and os is a stream that refers to a
1099+
// terminal capable of displaying Unicode which is determined in an
1100+
// implementation-defined manner, writes out to the terminal using the
1101+
// native Unicode API; if out contains invalid code units, the behavior is
1102+
// undefined and implementations are encouraged to diagnose it. If the
1103+
// native Unicode API is used, the function flushes os before writing out.
1104+
//
1105+
// This is the path for the native API, start with flushing.
1106+
__os.flush();
1107+
1108+
# ifndef _LIBCPP_HAS_NO_EXCEPTIONS
1109+
try {
1110+
# endif // _LIBCPP_HAS_NO_EXCEPTIONS
1111+
ostream::sentry __s(__os);
1112+
if (__s) {
1113+
# ifndef _LIBCPP_WIN32API
1114+
__print::__vprint_unicode_posix(__file, __fmt, __args, __write_nl, true);
1115+
# elif !defined(_LIBCPP_HAS_NO_WIDE_CHARACTERS)
1116+
__print::__vprint_unicode_windows(__file, __fmt, __args, __write_nl, true);
1117+
# else
1118+
# error "Windows builds with wchar_t disabled are not supported."
1119+
# endif
1120+
}
1121+
1122+
# ifndef _LIBCPP_HAS_NO_EXCEPTIONS
1123+
} catch (...) {
1124+
__os.__set_badbit_and_consider_rethrow();
1125+
}
1126+
# endif // _LIBCPP_HAS_NO_EXCEPTIONS
1127+
}
1128+
1129+
template <class = void> // TODO PRINT template or availability markup fires too eagerly (http://llvm.org/PR61563).
1130+
_LIBCPP_AVAILABILITY_PRINT _LIBCPP_HIDE_FROM_ABI inline void
1131+
vprint_unicode(ostream& __os, string_view __fmt, format_args __args) {
1132+
std::__vprint_unicode(__os, __fmt, __args, false);
1133+
}
1134+
# endif // _LIBCPP_HAS_NO_UNICODE
1135+
1136+
template <class... _Args>
1137+
_LIBCPP_AVAILABILITY_PRINT _LIBCPP_HIDE_FROM_ABI void
1138+
print(ostream& __os, format_string<_Args...> __fmt, _Args&&... __args) {
1139+
# ifndef _LIBCPP_HAS_NO_UNICODE
1140+
if constexpr (__print::__use_unicode)
1141+
std::__vprint_unicode(__os, __fmt.get(), std::make_format_args(__args...), false);
1142+
else
1143+
std::__vprint_nonunicode(__os, __fmt.get(), std::make_format_args(__args...), false);
1144+
# else // _LIBCPP_HAS_NO_UNICODE
1145+
std::__vprint_nonunicode(__os, __fmt.get(), std::make_format_args(__args...), false);
1146+
# endif // _LIBCPP_HAS_NO_UNICODE
1147+
}
1148+
1149+
template <class... _Args>
1150+
_LIBCPP_AVAILABILITY_PRINT _LIBCPP_HIDE_FROM_ABI void
1151+
println(ostream& __os, format_string<_Args...> __fmt, _Args&&... __args) {
1152+
# ifndef _LIBCPP_HAS_NO_UNICODE
1153+
// Note the wording in the Standard is inefficient. The output of
1154+
// std::format is a std::string which is then copied. This solution
1155+
// just appends a newline at the end of the output.
1156+
if constexpr (__print::__use_unicode)
1157+
std::__vprint_unicode(__os, __fmt.get(), std::make_format_args(__args...), true);
1158+
else
1159+
std::__vprint_nonunicode(__os, __fmt.get(), std::make_format_args(__args...), true);
1160+
# else // _LIBCPP_HAS_NO_UNICODE
1161+
std::__vprint_nonunicode(__os, __fmt.get(), std::make_format_args(__args...), true);
1162+
# endif // _LIBCPP_HAS_NO_UNICODE
1163+
}
1164+
1165+
#endif // _LIBCPP_STD_VER >= 23
1166+
10081167
_LIBCPP_END_NAMESPACE_STD
10091168

10101169
#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20

libcxx/include/print

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ namespace std {
5959

6060
_LIBCPP_BEGIN_NAMESPACE_STD
6161

62-
#ifdef _WIN32
62+
#ifdef _LIBCPP_WIN32API
6363
_LIBCPP_EXPORTED_FROM_ABI bool __is_windows_terminal(FILE* __stream);
6464

6565
# ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
@@ -75,7 +75,7 @@ _LIBCPP_EXPORTED_FROM_ABI bool __is_windows_terminal(FILE* __stream);
7575
_LIBCPP_EXPORTED_FROM_ABI void __write_to_windows_console(FILE* __stream, wstring_view __view);
7676
# endif // _LIBCPP_HAS_NO_WIDE_CHARACTERS
7777

78-
#endif // _WIN32
78+
#endif // _LIBCPP_WIN32API
7979

8080
#if _LIBCPP_STD_VER >= 23
8181

@@ -198,7 +198,11 @@ inline constexpr bool __use_unicode = true;
198198
# endif
199199

200200
_LIBCPP_HIDE_FROM_ABI inline bool __is_terminal(FILE* __stream) {
201-
# ifdef _WIN32
201+
// The macro _LIBCPP_TESTING_PRINT_IS_TERMINAL is used to change
202+
// the behavior in the test. This is not part of the public API.
203+
# ifdef _LIBCPP_TESTING_PRINT_IS_TERMINAL
204+
return _LIBCPP_TESTING_PRINT_IS_TERMINAL(__stream);
205+
# elif defined(_LIBCPP_WIN32API)
202206
return std::__is_windows_terminal(__stream);
203207
# elif __has_include(<unistd.h>)
204208
return isatty(fileno(__stream));
@@ -271,7 +275,7 @@ __vprint_unicode_windows(FILE* __stream, string_view __fmt, format_args __args,
271275
// the behavior in the test. This is not part of the public API.
272276
# ifdef _LIBCPP_TESTING_PRINT_WRITE_TO_WINDOWS_CONSOLE_FUNCTION
273277
_LIBCPP_TESTING_PRINT_WRITE_TO_WINDOWS_CONSOLE_FUNCTION(__stream, __view);
274-
# elif defined(_WIN32)
278+
# elif defined(_LIBCPP_WIN32API)
275279
std::__write_to_windows_console(__stream, __view);
276280
# else
277281
std::__throw_runtime_error("No defintion of _LIBCPP_TESTING_PRINT_WRITE_TO_WINDOWS_CONSOLE_FUNCTION and "
@@ -309,7 +313,7 @@ __vprint_unicode([[maybe_unused]] FILE* __stream,
309313
// so there the call can be forwarded to the non_unicode API. On
310314
// Windows there is a different API. This API requires transcoding.
311315

312-
# ifndef _WIN32
316+
# ifndef _LIBCPP_WIN32API
313317
__print::__vprint_unicode_posix(__stream, __fmt, __args, __write_nl, __print::__is_terminal(__stream));
314318
# elif !defined(_LIBCPP_HAS_NO_WIDE_CHARACTERS)
315319
__print::__vprint_unicode_windows(__stream, __fmt, __args, __write_nl, __print::__is_terminal(__stream));

libcxx/include/version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -454,7 +454,7 @@ __cpp_lib_within_lifetime 202306L <type_traits>
454454
# undef __cpp_lib_optional
455455
# define __cpp_lib_optional 202110L
456456
// # define __cpp_lib_out_ptr 202106L
457-
// # define __cpp_lib_print 202207L
457+
# define __cpp_lib_print 202207L
458458
// # define __cpp_lib_ranges_as_const 202207L
459459
# define __cpp_lib_ranges_as_rvalue 202207L
460460
// # define __cpp_lib_ranges_chunk 202202L

libcxx/lib/abi/arm64-apple-darwin.libcxxabi.v1.stable.exceptions.nonew.abilist

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1465,6 +1465,7 @@
14651465
{'is_defined': True, 'name': '__ZNSt3__117moneypunct_bynameIcLb1EE4initEPKc', 'type': 'FUNC'}
14661466
{'is_defined': True, 'name': '__ZNSt3__117moneypunct_bynameIwLb0EE4initEPKc', 'type': 'FUNC'}
14671467
{'is_defined': True, 'name': '__ZNSt3__117moneypunct_bynameIwLb1EE4initEPKc', 'type': 'FUNC'}
1468+
{'is_defined': True, 'name': '__ZNSt3__118__get_ostream_fileERNS_13basic_ostreamIcNS_11char_traitsIcEEEE', 'type': 'FUNC'}
14681469
{'is_defined': True, 'name': '__ZNSt3__118__time_get_storageIcE4initERKNS_5ctypeIcEE', 'type': 'FUNC'}
14691470
{'is_defined': True, 'name': '__ZNSt3__118__time_get_storageIcE9__analyzeEcRKNS_5ctypeIcEE', 'type': 'FUNC'}
14701471
{'is_defined': True, 'name': '__ZNSt3__118__time_get_storageIcEC1EPKc', 'type': 'FUNC'}

0 commit comments

Comments
 (0)