[libcxx-commits] [libcxx] [libc++][ranges] Fix the LWG 3568 test for `basic_istream_view` (PR #215589)

A. Jiang via libcxx-commits libcxx-commits at lists.llvm.org
Wed Aug 12 18:15:33 PDT 2026


================
@@ -27,6 +27,15 @@ static_assert(std::constructible_from<std::ranges::wistream_view<int>, std::wist
 static_assert(!std::convertible_to<std::wistream&, std::ranges::wistream_view<int>>);
 #endif
 
+struct NoopExtraction {
+  int n_; // intentionally doesn't have default member initializer
+};
+
+template <class CharT, class Traits>
+std::basic_istream<CharT, Traits>& operator>>(std::basic_istream<CharT, Traits>& is, const NoopExtraction&) {
+return is; // intentionally doesn't modify the NoopExtraction object
+}
----------------
frederick-vs-ja wrote:

We should use clang-format to format this file.

https://github.com/llvm/llvm-project/pull/215589


More information about the libcxx-commits mailing list