[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 Apr 8 13:01:10 PDT 2023


mstorsjo updated this revision to Diff 511921.
mstorsjo added a comment.

Added testcases - it turned out to be quite straightforward to pipe things to a file and compare with a reference file (which contains raw wchars).

These new testcases are windows specific though, as they use _setmode() to put stdout/stderr/stdin in wide char mode.

I kept the if constexpr for now; this can be pushed after D147855 <https://reviews.llvm.org/D147855> when the header is made properly private under src.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D146398

Files:
  libcxx/include/__std_stream
  libcxx/test/std/input.output/iostream.objects/wide.stream.objects/check-stderr.sh
  libcxx/test/std/input.output/iostream.objects/wide.stream.objects/check-stdout.sh
  libcxx/test/std/input.output/iostream.objects/wide.stream.objects/send-stdin.sh
  libcxx/test/std/input.output/iostream.objects/wide.stream.objects/test.dat
  libcxx/test/std/input.output/iostream.objects/wide.stream.objects/wcerr-wide-mode.sh.cpp
  libcxx/test/std/input.output/iostream.objects/wide.stream.objects/wcin-wide-mode.sh.cpp
  libcxx/test/std/input.output/iostream.objects/wide.stream.objects/wcout-wide-mode.sh.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D146398.511921.patch
Type: text/x-patch
Size: 9131 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20230408/902a6af1/attachment.bin>


More information about the libcxx-commits mailing list