RFR: 8319117: GrowableArray: Allow for custom initializer instead of copy constructor [v8]
Kim Barrett
kbarrett at openjdk.org
Thu Nov 2 19:48:04 UTC 2023
On Thu, 2 Nov 2023 09:49:28 GMT, Johan Sjölen <jsjolen at openjdk.org> wrote:
>> My point is that the old code was fine. Copy-assigning the fill argument
>> (either defaulted or passed in) had to work (E can't be non-copyable), because
>> at_put_grow requires E to be copy-assignable in order to install the new value
>> at index i.
>
>>at_put_grow requires E to be copy-assignable in order to install the new value
> at index i.
>
> With the new code it doesn't seem to me that `at_put_grow` requires this, correct? I'd like to get rid of this requirement.
See line#430: `this->_data[i] = elem;`. That requires E to be copy-assignable.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/16409#discussion_r1380695612
More information about the hotspot-dev
mailing list