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

    <tr>
        <th>Summary</th>
        <td>
            [C++20] Can't compare `tuple<string>` with `tuple<string_view>` when using libstdc++
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
      </td>
    </tr>

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

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

<pre>
    Here's the code:
```cpp
#include <string>
#include <string_view>
#include <tuple>

bool x = std::tuple<std::string>{} < std::tuple<std::string_view>{};
```
It doesn't compile when using `-std=c++20 -stdlib=libstdc++`. Switching to `-std=c++17` and/or `-stdlib=libc++` fixes the error.

The error message boils down to failing SFINAE on tuple's `operator<=>`:
```
.../include/c++/11.2.0/tuple:1546:5: note: candidate template ignored: substitution failure [with _Tps = <std::basic_string<char>>, _Ups = <std::basic_string_view<char>>]: no matching function for call to object of type 'const struct _Synth3way'
    operator<=>(const tuple<_Tps...>& __t, const tuple<_Ups...>& __u)
    ^
```

Tested both on 14.0.0 and trunk (commit b64f6e5722), with both libstdc++ 11 and 12.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyFU8lyozAQ_Rq4dIUCsdkHDl7iSi5zSXJ2CSEbTWRESSKO_35aLCaOJxWXDKLX16-7S1VdiieuuUdyA7bmwFTFvXjlhVsvXHlZOBzWtqOExKJhsqs4ePHGWC2aoxc__qzcfwh-_sHCdq3ks65_lkpJ-ETtFoytHJJ4NdptroI5b7728q2L9av1FUjv4sXrbyUOn88WKsVNg3xY5OLUCsnhXPMGOoNBAA0f-sBb5pE1HhKCE0hRogyfeB81aBrAy1lYVjtPq-6doxxFQJvKIzulJ_011hwIDuKTDw3iWisdfKXsdZLCiRtDjxxKJaTBQs6NS3ugQjoEL7vnP6tHUCjsKXItx9iq5ZpapZEyTOsYQjLuJmD4DIIAoY4txNuEkOyiKCBBiJeR_lWUJhm-UvxDo6wTAcNSRUUtB8tPrXQXcWyU5q5TYDpkT9jOCoToQHcaxyRdI4U17F9b00_F186W1Ai2n6Zhw2qqHX48ZAP7t188xon46pZuB7hwomPbDl3DBkDIL6NSOkZV-ZczC-oA9tIiRpIz1RiLM6g7lO9fLo2t4zO9oGYgDvB3TzRZDH7TyLoiHcVOlcF-b10d30zebk06jyznFF76-N--jYPCjeUVTgfyiRVFSRAG_fgB4m7eocdzOgkLZZYcMp7mhLjwCKLvQe94M-MQRb1_RAK_KuJqGS-pjz2UvMDGbaYVQV5hQ-eloq6xWThv6rTOOOl9pjvldXudxbyON2D8TsuitrY1rtdkh-eIwboywJz4IeXH9HpotXItdMNsTMcNXtJ0kaV-XSwYScpluKR5ltIyz6soSpYsPpRZXEZ5yXxJSy6NKxDr8kVBQkLCLIxJGCdRHizzOIlz9F6wPMqiyktCfsJpDlziQOmjr4seQ9kdDSqlMNbMSmoM7gTnU3za2Vrp4knJy1pS9r6h1u8xFz3gf_jSuh4">