News for hackers. Stuff that matters.
Re:Comparison of C++17, Go, and Java for a next-generation s... by alexhutcheson on Thursday April 23, 2020 @09:55PM (#22963840)
It’s unfortunately not just ABI, but also API. The standard specifies that you can get iterations to specific buckets in O(1)[1], and also specifies bucket_count(), max_bucket_count(), bucket_size() (which is specified to be O(n)), and bucket(). Those functions and their specified performance make it effectively impossible to implement a standards-compliant std::unordered_map without using separate chaining.

[1] https://en.cppreference.com/w/cpp/container/unordered_map/be...

Re:Comparison of C++17, Go, and Java for a next-generation s... by SamReidHughes on Friday April 24, 2020 @12:11PM (#22969614)
You can just remove those functions. The real problem is that the API break would invalidate iterators and create undefined behavior.