RFR: 8319117: GrowableArray: Allow for custom initializer instead of copy constructor [v2]
Kim Barrett
kbarrett at openjdk.org
Wed Nov 1 16:41:05 UTC 2023
On Wed, 1 Nov 2023 15:33:20 GMT, Jorn Vernee <jvernee at openjdk.org> wrote:
>> Hi Jorn, the style guide currently doesn't allow for using perfect forwarding or move semantics in the code, so we cannot do this at the moment.
>>
>> There's a PR for that: https://github.com/openjdk/jdk/pull/15386
>
> Ah, ok I see. Thanks for the link.
This is a case where using rvalues and perfect forwarding is incorrect. The
arguments are potentially used in multiple E constructor calls. Using the same
rvalue in multiple places is very bad.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/16409#discussion_r1379039865
More information about the hotspot-dev
mailing list