RFR: 8337995: ZUtils::fill uses std::fill_n

Thomas Schatzl tschatzl at openjdk.org
Wed Dec 11 09:54:37 UTC 2024


On Wed, 11 Dec 2024 09:26:34 GMT, Hamlin Li <mli at openjdk.org> wrote:

> The code change itself looks good.
> 
> Just got one question about the rule, I know a c++ compiler needs to support c++14, as `std::fill_n` is introduced in 17/20/26, so seems we should not use it in hotspot code, is this the reason why we can not use `std::fill_n` here? Or there is a place recording which libaraies/files are allowed or not allowed in hotspot? Thanks!

The hotspot style guide only allows a few libraries from the standard library to be used (https://github.com/openjdk/jdk/blob/master/doc/hotspot-style.md?plain=1#L531). A previous paragraph (https://github.com/openjdk/jdk/blob/master/doc/hotspot-style.md?plain=1#L377) states that unless explicitly allowed, use of other features is disallowed.

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

PR Comment: https://git.openjdk.org/jdk/pull/22667#issuecomment-2535349035


More information about the hotspot-gc-dev mailing list