[crac] RFR: 8368929: [CRaC] Move CPUFeatures check to C/R engine [v4]

Jan Kratochvil jkratochvil at openjdk.org
Tue Oct 7 12:32:22 UTC 2025


On Tue, 7 Oct 2025 12:06:35 GMT, Radim Vansa <rvansa at openjdk.org> wrote:

>> You are right, it didn't work when I've tried to pass lvalue references in a test (and thanks to testing separately I found a bug in the list impl itself...). While this is not critical for CRaC itself I took the opportunity to improve my C++ knowledge and do the structures right :) Here is a standalone check to ensure that the containers work as expected: https://gist.github.com/rvansa/5f4cb76ddb4f694d2feb9a1ffb09d630
>> Note that I use two methods in `linkedlist.hpp` rather than universal reference in the end, as the universal reference template would consider `{ ... }` a braced initializer list rather than a struct initializer.
>
> With the last change I can't use aggregate initializer anyway as the move ctor is defined :-/ Good ol' Java.

It is an initializer list, one should not call it with an initializer list but rather just with the number itself. Up to you what calling conventions you want to support.

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

PR Review Comment: https://git.openjdk.org/crac/pull/266#discussion_r2410464184


More information about the crac-dev mailing list