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

Julian Waters jwaters at openjdk.org
Tue Jan 24 09:21:39 UTC 2023


On Mon, 23 Jan 2023 10:13:30 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:

>> Julian Waters has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Further Changes
>
> 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/
> :)

And here I was thinking this would sound more professional :P

Speaking of which, could I include a condensed and shortened version of this part from our discussion above? I've left it out in the meantime but just wanted to ask in case
> std::alignment_of<> could be used in advanced metaprogramming contexts
involving higher order metafunctions. We don't do that sort of thing much at
all in HotSpot. If someone finds a place where std::alignment_of<> might be
better, we can revisit its status.

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

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


More information about the hotspot-dev mailing list