Integrated: 8252582: HotSpot Style Guide should permit variable templates

Kim Barrett kbarrett at openjdk.org
Tue Sep 16 04:45:24 UTC 2025


On Fri, 12 Sep 2025 01:13:25 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:

> Please review this change to the HotSpot Style Guide to permit the use of
> variable templates. This is a C++14 feature that, while fairly simple, didn't
> get into the initial permitted for HotSpot list because I just didn't get to
> it and nobody asked for it. And it has languished on the "undecided" list for
> the same reasons. But recently I've had reason to want to use this feature a
> couple of times, so I'm now proposing we allow it.
> 
> I merged it into the section for Inline Variables (a C++17 feature), as the
> two are closely related. Variable templates were even listed as one of the
> workarounds being used to make up for the lack of inline variables.

This pull request has now been integrated.

Changeset: 0fbae805
Author:    Kim Barrett <kbarrett at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/0fbae8050b6f853053c7dee6a43d3ffbcfa69954
Stats:     50 lines in 2 files changed: 15 ins; 7 del; 28 mod

8252582: HotSpot Style Guide should permit variable templates

Reviewed-by: dholmes, stefank, kvn

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

PR: https://git.openjdk.org/jdk/pull/27240


More information about the hotspot-dev mailing list