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

Iskandar Emomzoda via libcxx-commits libcxx-commits at lists.llvm.org
Wed Aug 12 08:57:00 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);
----------------
iskandarem wrote:

do you mean for a test block, like
```cpp 
void test() {
    {
        // ohter test blocks 
    }
        ...
    {
        //my test block
    }
}
```

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


More information about the libcxx-commits mailing list