[libcxx-commits] [libcxx] [libc++][print] Adds ostream overloads. (PR #73262)

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Tue Dec 12 09:44:11 PST 2023


================
@@ -1195,6 +1209,140 @@ extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_ostream<char>;
 extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_ostream<wchar_t>;
 #endif
 
+#if _LIBCPP_STD_VER >= 23
+
+template <class = void> // TODO PRINT template or availability markup fires too eagerly (http://llvm.org/PR61563).
+_LIBCPP_HIDE_FROM_ABI inline void
+__vprint_nonunicode(ostream& __os, string_view __fmt, format_args __args, bool __write_nl) {
+  ostream::sentry __s(__os);
+  if (__s) {
+    string __o = vformat(__os.getloc(), __fmt, __args);
----------------
ldionne wrote:

```suggestion
    string __o = std::vformat(__os.getloc(), __fmt, __args);
```

https://github.com/llvm/llvm-project/pull/73262


More information about the libcxx-commits mailing list