<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/55883>55883</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
`unordered_multiset` fails to assign when using constexpr lambda as criterions in libc++
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
992678220
</td>
</tr>
</table>
<pre>
Here's the code. While gcc, msvc and clang with libstdc++ compile, clang with libc++ fails.
https://godbolt.org/z/vrzW5ncaW
```
#include <unordered_set>
constexpr auto hash{[](int value) {
return std::hash<int>{}(value);
}};
constexpr auto equal{[](int lhs, int rhs) {
return lhs == rhs;
}};
auto main() -> int {
using Multiset =
std::unordered_multiset<int, decltype(hash), decltype(equal)>;
Multiset ctor;
Multiset copy_ctor{ctor}; // compiles
Multiset move_ctor{std::move(ctor)}; // compiles
Multiset assign;
Multiset copy_assign;
copy_assign = ctor; // FAILS
Multiset move_assign;
move_assign = std::move(ctor); // FAILS
}
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx9VEuT4iAQ_jXkQo0ViXkdcvAx1m7V7mkPHqcIoGELgwtE1_n125CoGR-bQhP68fXXTTe15ufqmzACkdxi1wjMNBcTvGmkEnjHGCJLvLdHhmnLMVO03eGTdA1WsraOg3oBC5z2B3Dwxl9tLgZbKpWdoHiF4nn_3zh3sCiZI7KGtdO81spNtNnB7hN-R_O5SVtGN2MnlMXD6rckkS1THRcYJcuu1YZDKvzDCoeS97Ej06114u_BYNo5jRtqG5QvUAprhUghW4ePVHWQQYm9IjhhbITrTIshU880mQe_ZAnmHh_scu998UTJ4OjFsK7bZxTEn46qew6qsb6G_tP4z2dkwAayBfRVsPlvzBBpT2UL-B7tDWgH9BFsZyUc2M9OOQl1C9CDxj_X1G_V3Q-mQyGALxdMufMBalCECkEpvkr7ZH2F3q8M8S0mc9o8levD-SMo80X_8gni8dO3z6UB7QPEXh_FBeKaixcCqyAGUgPqU6gHQGqt3LUv2T6oR1Jf20uu13Dr-fcfv17ECuQfEEfSgPgqrRdB8tXdLEW8SniZlDRy0ilRgejJYWdxP8QYOmoIfmpEO7TPrbkV3decgglmRjphJGig5UaXQdQZVd2NP1wXXT2B0sNGqePl9XYw-rdg0GRraW0Hh0LWaVoUSdRU6bYosikrZzxlsxljWUpEzqeUT7dFvI2zSNFaKFv5ASOkFSccIOAb5i2SFYkJibM4nSYzMiWTlG5pWTJa5zkneVygWSxgctTE8_D3UmSqQKnudhaUSlpnb8q-JEJU_TxHMHmNNlVZkiwvIFAUgleB_D944qLz">