On Wed, 25 Oct 2023 04:07:12 GMT, Quan Anh Mai <[email protected]> wrote:
>> src/hotspot/share/utilities/growableArray.hpp line 213:
>>
>>> 211:
>>> 212: template<typename T>
>>> 213: int find(T* token, bool f(T*, const E&)) const {
>>
>> What is the advantage of a const reference here?
>
> You can bind a non-const reference to a const one but not the other way.
Sorry I was unclear: what is the advantage of a reference here? Is it just to
avoid copying
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/15418#discussion_r1372500458