Issue |
128010
|
Summary |
Spaceship operator is missing a template argument for std::set & std::multiset
|
Labels |
|
Assignees |
|
Reporter |
jpboivin
|
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
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs