RFR: 8319117: GrowableArray: Allow for custom initializer instead of copy constructor [v2]

Johan Sjölen jsjolen at openjdk.org
Tue Oct 31 13:00:02 UTC 2023


On Tue, 31 Oct 2023 12:48:14 GMT, Quan Anh Mai <qamai at openjdk.org> wrote:

>>> > Should this be Args&... args?
>>> 
>>> Yes.
>>> 
>> 
>> Actually, no: We can't take by reference because most of the time we're calling `at_grow` and `at_put_grow` with rvalues and not lvalues, so we need move semantics for this to work. We have to keep the arguments as copying.
>
> I see, in that case it must be `const Args&... args`. https://godbolt.org/z/aov8v38s9

Fixed, thanks for the help with this.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/16409#discussion_r1377545318


More information about the hotspot-dev mailing list