RFR: 8274400: HotSpot Style Guide should permit use of alignof [v6]

Kim Barrett kbarrett at openjdk.org
Mon Jan 23 10:17:13 UTC 2023


On Mon, 23 Jan 2023 09:52:29 GMT, Julian Waters <jwaters at openjdk.org> wrote:

>> The alignof operator was added by C++11. It returns the alignment for the given type. Various metaprogramming usages exist, in particular when using std::aligned_storage. Use of this operator should be permitted in HotSpot code.
>
> Julian Waters has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Further Changes

Changes requested by kbarrett (Reviewer).

doc/hotspot-style.md line 580:

> 578: Certain restrictions apply to the declarations provided by `<type_traits>`.
> 579: 
> 580: * The `alignof` operator should be utilized rather than `std::alignment_of<>`.

s/utilized/used/
https://scientistseessquirrel.wordpress.com/2019/04/16/for-the-love-of-all-that-is-holy-stop-writing-utilize/
:)

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

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


More information about the hotspot-dev mailing list