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

Andrew Haley aph at openjdk.org
Wed Dec 4 10:19:42 UTC 2024


On Tue, 3 Dec 2024 10:27:48 GMT, Casper Norrbin <cnorrbin at openjdk.org> wrote:

>> src/hotspot/share/utilities/rbTree.hpp line 1:
>> 
>>> 1: /*
>> 
>> Just a drive-by comment but why is this all in the hpp file instead of being split into hpp (and maybe .inline.hpp) and cpp files?
>
> The entire tree is templated, so we can't easily move the implementation to a cpp file

You can, by using explicit template instantiation. That would be an improvement over putting it all in the header file, IMHO.

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

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


More information about the hotspot-dev mailing list