RFR: 8274400: HotSpot Style Guide should permit use of alignof [v2]
Julian Waters
jwaters at openjdk.org
Wed Dec 28 10:44:51 UTC 2022
On Mon, 26 Dec 2022 23:54:00 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:
>> Julian Waters has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains three additional commits since the last revision:
>>
>> - More Descriptive Version
>> - Merge remote-tracking branch 'upstream/master' into alignof
>> - HotSpot Style Guide should permit use of alignof
>
> doc/hotspot-style.md line 708:
>
>> 706: operator in the development of the language and just returns the corresponding
>> 707: `alignof` value, the operator simply provides less verbose syntax for doing so.
>> 708: Newer code should prefer `alignof` to `std::alignment_of<>` if possible.
>
> Some of this is extraneous, explaining what `alignof` does, which one can get
> elsewhere. (We don't need to summarize/duplicate that information here.)
> Something short and simple like this is sufficient:
>
> Use of `alignof`
> ([n2341](https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2341.pdf))
> is permitted. It should be used instead of `std::alignment_of<>`.
>
> (We don't need to talk about "Newer code" - I'm pretty sure we have no uses of `std::alignment_of<>`
> in HotSpot.)
Will do, thanks
-------------
PR: https://git.openjdk.org/jdk/pull/11761
More information about the hotspot-dev
mailing list