Add support for std::coroutine_handle#32
Conversation
|
What's the intended use of |
In my case, it's for storing an The other motivation is just a simple: "Well, the stdlib does it so we should too" |
|
Aren't you going to store |
This is a good question and I don't necessarily have a great response to it. I might wind up storing I can, instead, do some external market research and see how other people are using |
|
The test is overspecified; it should test that the hashes of t and t2 match and that they don't match the hash of t3 (a second task). We don't want to guarantee that hashing a coroutine_handle produces the same result as hashing .address, because we want to be able to return the result of If we want to be stricter than that and check that the hash isn't of extremely poor quality, we can do a collision test with something like 256 values, checking that there are no duplicates, as is done f.ex. in https://github.com/boostorg/container_hash/blob/develop/test/hash_number_test2.cpp. |
|
On the other hand, for transparent hashing purposes, we do want to guarantee that |
|
@pdimov should we revisit this? |
We need to keep with the times
https://godbolt.org/z/1andznGhq