[libcxx-commits] [PATCH] D133560: [libc++] split `<istream>` header

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Fri Sep 30 09:07:22 PDT 2022


ldionne added a comment.

I think this can be pretty much abandoned and the forward declaration of `basic_istream` folded into the `istream_view` patch itself.



================
Comment at: libcxx/include/__istream/basic_istream.h:1
+//===----------------------------------------------------------------------===//
+//
----------------
In light of the survey of other implementations we just did during live review (https://godbolt.org/z/G6EbqvY57), I suggest we:

1. Add a `__fwd/basic_istream.h` header that forward declares the class itself, but nothing else.
2. Include `__fwd/basic_istream.h` from `istream_view.h`, but not all of iostream or even a clever subset of it.

The result will be that users can't use `istream_view` without including `<istream>` themselves, however that's what other implementations do. And the alternative would be to pull in large parts of `iostream` and the localization library, and that's unacceptable.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D133560



More information about the libcxx-commits mailing list