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

    <tr>
        <th>Summary</th>
        <td>
            Spaceship operator is missing a template argument for std::set & std::multiset
        </td>
    </tr>

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

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

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

<pre>
    The spaceship operator is implemented for `std::set` & `std::multiset`, but is missing the `_Compare` template parameter. It is specialized for `set<_Key, _Allocator>` for example, while it should be `set<_Key, _Compare, _Allocator>`. Using a custom allocator makes the operator unusable, for example:

```
/usr/lib/llvm-19/bin/../include/c++/v1/set:1454:1: note: candidate template ignored: could not match 'std::allocator' against 'foo::Allocator'
1454 | operator<=>(const multiset<_Key, _Allocator>& __x, const multiset<_Key, _Allocator>& __y) {
```

https://github.com/llvm/llvm-project/blob/llvmorg-19.1.7/libcxx/include/set#L995
https://github.com/llvm/llvm-project/blob/llvmorg-19.1.7/libcxx/include/set#L1454
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJy8VE1v2zgQ_TWjCxGBIvVhHXRQnBWw2L3t9mxQ5FhiSokCSblOf31BOXacNj3kUmAgAZyv996QI7zXw4zYQPEIxVMi1jBa1zwvvdUnPSe9VS_N_yMSvwiJftQLsQs6Eawj2hM9LQYnnAMqcrSOQEl9UMBb4K3HACUlwMp3x9Nqgr74gO1Jv4ZYaNLe63kgYcQYfdjbaREOY4GA02JEQLIIJyYM6FLy95bkF5RaGP39rjsG4PvDP_gSix9aY6yMYIH_FWvFKDyLiDr6v43aINGB-NGuRpEeP6hxhfJBvZR82VALIlcf7ETE1U8m8RX9Ruem1zqvXvSXzvdAeAt0s5K-Gm2Bdat3wDqj-_g1p-khq4F1vZ6BdWkKrNOzNKtCYJ0E9rhZd8qAdRuBNsuLPP6At2S2IfYhUsxKqyjmTVU9zNah2rybCLMNZBJBjgRYdRvbjRmwiohB6NmHGHC09hLQ3gUA3boTqPY3-sD3wJ-ibmwnbcy-3YTfDYyV5HA4x_PPJLwAqwlUjz8rStsxhMVHtKwD1g06jGufSju9CnzVeXH2GWWIYht7Vd-64SGr0yytLkOR5_O7EURYjP9b18WfaRT1TVTDVc1rkWCTVTmlJav4LhkbQcueSi52ih-ZErI87nJOUdSSl0cuVKIbRllBGaNZnhe8SuuCFSVXdYF9XVSVgpziJLRJI6TUuiHR3q_YZGxHM5oY0aPx16Xhmo1Ovw4ecmq0D_4tL-hgsPnvw_VxffXi7ToKN6xxoWwv5H6XbIvkly2SrM40n5Z74-KBda90Tg37EQAA__8I95nu">