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

Hristo Hristov via libcxx-commits libcxx-commits at lists.llvm.org
Wed Aug 12 06:49:06 PDT 2026


================
@@ -39,10 +39,8 @@ void test() {
 
   // LWG 3568. basic_istream_view needs to initialize value_
   {
-    auto iss = make_string_stream<CharT>("");
-    std::ranges::basic_istream_view<int, CharT> isv{iss};
-    auto iter = isv.begin();
-    assert(*iter == 0);
+    static auto fn_local_iss = make_string_stream<CharT>("");
+    [[maybe_unused]] constexpr auto isv = std::views::istream<int>(fn_local_iss);
----------------
Zingam wrote:

@iskandarem Can you use the `{}` if possible for conistency.

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


More information about the libcxx-commits mailing list