RFR: 8345314: Add a red–black tree as a utility data structure [v3]

Andrew Haley aph at openjdk.org
Wed Dec 4 12:16:38 UTC 2024


On Wed, 4 Dec 2024 12:05:18 GMT, Casper Norrbin <cnorrbin at openjdk.org> wrote:

>> You can, by using explicit template instantiation. That would be an improvement over putting it all in the header file, IMHO.
>
> @theRealAph I don't think that would be possible either. We can't possibly know every type combination to instantiate, especially since we're asking users to provide their own comparator and allocator through the template.
> 
> And like Johan said, we already have templated header-only structures, like `GrowableArray` and `ConcurrentHashTable`.

Yes of course we can. Users add their own instantiations as required. I'm not saying you must do this, but I am saying it's not hard.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/22360#discussion_r1869381759


More information about the hotspot-dev mailing list