[libcxx-commits] [PATCH] D146398: [libcxx] Fix using std::wcout/wcin on Windows with streams configured in wide mode

Mark de Wever via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Sat Apr 8 04:45:00 PDT 2023


Mordante added a comment.

Is it possible to add tests for these changes?



================
Comment at: libcxx/include/__std_stream:87
+#if defined(_LIBCPP_WIN32API)
+    if constexpr (sizeof(char_type) == sizeof(wchar_t)) {
+        __encoding_ = 1;
----------------
`if constexpr` fails before C++17, AFAIK this code should be working in all language modi.


================
Comment at: libcxx/include/__std_stream:124
     }
+#if defined(_LIBCPP_WIN32API)
+    char_type __extbuf[__limit];
----------------
Is this `ifdef` really needed? Will it fail on Linux when using `char_type`?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D146398/new/

https://reviews.llvm.org/D146398



More information about the libcxx-commits mailing list