[libcxx-commits] [PATCH] D116642: [libc++] Implement operator<< for filesystem::directory_entry.
Konstantin Varlamov via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Jan 4 20:39:01 PST 2022
var-const added inline comments.
================
Comment at: libcxx/include/__filesystem/directory_entry.h:26
#include <cstdlib>
+#include <ostream>
#include <system_error>
----------------
>From what I've seen, other headers that implement `operator<<` include `<iosfwd>` -- at the very least, I couldn't find one that includes `<ostream>`. However, I'm not sure this is actually valid given that the code actually invokes a member function on the stream (`operator<<`) whereas `<iosfwd>` only contains a forward declaration of the class.
================
Comment at: libcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.io/directory_entry.io.pass.cpp:14
+//
+// class directory_entry
+//
----------------
This test is largely copied from `test/std/input.output/filesystems/class.path/path.nonmember/path.io.pass.cpp`.
================
Comment at: libcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.io/directory_entry.io.pass.cpp:50
+ // TODO(var-const): uncomment when it becomes possible to instantiate a `basic_ostream` object with a sized character
+ // type. Currently the instantiation would fail because `ctype` only has specializations for `char` and `wchar_t`.
+ //TestOutput<char8_t>();
----------------
See https://wandbox.org/permlink/hUEUX67Ejcgxz6UT.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D116642/new/
https://reviews.llvm.org/D116642
More information about the libcxx-commits
mailing list