<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/121233>121233</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            std::views::zip causes "error: type constraint differs in template redeclaration"
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          somecho
      </td>
    </tr>
</table>

<pre>
    Hello! Compiling this example from [cppreference](https://en.cppreference.com/w/cpp/ranges/zip_view) works with GCC 13.2 but not Clang 17.0.1 using `-std=c++23` flag. See comparison on [godbolt](https://godbolt.org/z/KabY5Mhcz). 

```cpp
#include <array>
#include <iostream>
#include <list>
#include <ranges>
#include <string>
#include <tuple>
#include <vector>
 
void print(auto const rem, auto const& range)
{
    for ([std::cout](http://en.cppreference.com/w/cpp/io/cout) << rem; auto const& elem : range)
        [std::cout](http://en.cppreference.com/w/cpp/io/cout) << elem << ' ';
    [std::cout](http://en.cppreference.com/w/cpp/io/cout) << '\n';
}
 
int main()
{
    auto x = [std::vector](http://en.cppreference.com/w/cpp/container/vector){1, 2, 3, 4};
    auto y = [std::list](http://en.cppreference.com/w/cpp/container/list)<[std::string](http://en.cppreference.com/w/cpp/string/basic_string)>{"α", "β", "γ", "δ", "ε"};
    auto z = [std::array](http://en.cppreference.com/w/cpp/container/array){'A', 'B', 'C', 'D', 'E', 'F'};
 
    print("Source views:", "");
    print("x: ", x);
    print("y: ", y);
    print("z: ", z);
 
    print("\nzip(x,y,z):", "");
 
    for ([std::tuple](http://en.cppreference.com/w/cpp/utility/tuple)<int&, [std::string](http://en.cppreference.com/w/cpp/string/basic_string)&, char&> elem : std::views::zip(x, y, z))
    {
        [std::cout](http://en.cppreference.com/w/cpp/io/cout) << std::get<0>(elem) << ' '
                  << std::get<1>(elem) << ' '
                  << std::get<2>(elem) << '\n';
 
        std::get<char&>(elem) += ('a' - 'A'); // modifies the element of z
    }
 
    print("\nAfter modification, z: ", z);
}
```

Clangd 19.1.2 also complains: 
![Image](https://github.com/user-attachments/assets/82b18271-1e75-49df-8100-629a8f0d2bf9)

</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJy0Vk9z6jYQ_zTLRQNjrzDGBw5gQtvp9PROPb0R9tqotS2PJCeBT99Z28EkgU7fvIYhZMWuf_rtX1Y5p8uGaAPRDqL9THX-ZOzGmZqyk5kdTX7e_EpVZQBDkZq61ZVuSuFP2gl6VXVbkSisqQVEu6xtLRVkqckIoj3g-uR960BuAQ-AB2oWtyaLzNSAhxfAQ9a2gAermpIc4OGi2-_Pml4AE_Fi7N9OvGh_Er-kqQjlAsWx86IxXqSVakoRxotgEYrOMTFYBXPnc5D7DHAHuEMJq0AUlSoX4huRyEzdKqudaYRpmHVp8qOp_D3Co2phbMmsAA-_q-Of0R-n7AKYLAQEW36vguHNXgRbQKmbrOpyEiBTZa06g3z6pNDGeUuqvqertPP3vh8DdEfjvNVNeU_ju7aie4pnyryxg4Y9eTY6F63VjQdcq84bkZnGeWGpBkzF9A3gSvRMABNGjXeMIIQojBWAa4h2fQa2ILeZ6W4i-58rQRsW-VlMmCvItOchdx94UEW1ALm9JSTG1xfxGK_sZcCY_0C-heCL7uQ7orS5XgXxfsyabryolW447h_S0UfqVYDcv6M15v3HiWWm8Uo3ZAEPIwgmEO9CLg_kD8kfSyYn35E4fyLRV_jPUeghMOEI3QCPjfDj0OODeDgqp7Pvb8eEGyTeASKkT8C-9p6-nfHDWX44Lz-cIxY-xefyKT7D2Pi5AA0YfYoA4y0XT8-kP45iOon7SXyaxAOLV8Ij6bcpAYjfTGczEjyth7l5dZffyeTozTOv3LCj5esjo_ON0fmR0eXG6DIZfTbk7rnoFnD9CpieAdPB_BHhxxNtmKc_npnO60r7M-BhQOgrt-e36gl8aQ0Pd2QnZVmUT9PcnMbCWwbldgoUR36M7HW0TgPmCwfeFbMkDzINuAtxzazfT8V-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