RFR: 8369186: HotSpot Style Guide should permit some uses of the C++ Standard Library [v4]
Ivan Walulya
iwalulya at openjdk.org
Thu Oct 23 08:32:08 UTC 2025
On Sat, 18 Oct 2025 17:11:48 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:
>> Please review this change to the HotSpot Style Guide to suggest that C++
>> Standard Library components may be used, after appropriate vetting and
>> discussion, rather than just a blanket "no, don't use it" with a few very
>> narrow exceptions. It provides some guidance on that vetting process and
>> the criteria to use, along with usage patterns.
>>
>> In particular, it proposes that Standard Library headers should not be
>> included directly, but instead through HotSpot-provided wrapper headers. This
>> gives us a place to document usage, provide workarounds for platform issues in
>> a single place, and so on.
>>
>> Such wrapper headers are provided by this PR for `<cstddef>`, `<limits>`, and
>> `<type_traits>`, along with updates to use them. I have a separate change for
>> `<new>` that I plan to propose later, under JDK-8369187. There will be
>> additional followups for other C compatibility headers besides `<cstddef>`.
>>
>> This PR also cleans up some nomenclature issues around forbid vs exclude and
>> the like.
>>
>> Testing: mach5 tier1-5, GHA sanity tests
>
> Kim Barrett has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains nine commits:
>
> - Merge branch 'master' into stdlib-header-wrappers
> - Merge branch 'master' into stdlib-header-wrappers
> - Merge branch 'master' into stdlib-header-wrappers
> - jrose comments
> - move tuple to undecided category
> - add wrapper for <type_traits>
> - add wrapper for <cstddef>
> - add wrapper for <limits>
> - style guide permits some standard library facilities
Marked as reviewed by iwalulya (Reviewer).
-------------
PR Review: https://git.openjdk.org/jdk/pull/27601#pullrequestreview-3368792334
More information about the serviceability-dev
mailing list