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

Martin Storsjö via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Sat Jun 3 13:00:06 PDT 2023


mstorsjo added inline comments.


================
Comment at: libcxx/docs/UsingLibcxx.rst:565
+the sequence of bytes read from, or written to, these streams is interpreted
+as a sequence of littleendian ``wchar_t`` elements. Thus, use of
+``std::cout``, ``std::cerr``, or ``std::cin`` with streams in Unicode mode
----------------
Mordante wrote:
> 
Thanks for catching, will fix.


================
Comment at: libcxx/test/std/input.output/iostream.objects/wide.stream.objects/wcerr-wide-mode.sh.cpp:13
+
+// XFAIL: no-wide-characters
+// REQUIRES: target={{.+}}-windows-{{.+}}
----------------
Mordante wrote:
> These tests use wide character types internally so I don't think we need to test they really fail.
Ok, fair enough.

FWIW we've got a couple other existing tests in this directory that use `XFAIL: no-wide-characters`, I guess we could change that, but that'd be a new change. I'll push this with `UNSUPPORTED` though.


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