RFR: 8319117: GrowableArray: Allow for custom initializer instead of copy constructor [v2]
Jorn Vernee
jvernee at openjdk.org
Wed Nov 1 15:36:08 UTC 2023
On Wed, 1 Nov 2023 15:18:54 GMT, Johan Sjölen <jsjolen at openjdk.org> wrote:
>> For perfect forwarding, (non-const) `Args&&...` should be used together with `std::forward` when doing the downstream call to the constructor. That will make it so rvalue arguments are forwarded as rvalues as well. The current code turns all args into lvalues. (see the example code here e.g. https://en.cppreference.com/w/cpp/utility/forward)
>>
>> Do we need to support NONCOPYABLE argument types as well?
>
> 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.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/16409#discussion_r1378959637
More information about the hotspot-dev
mailing list