RFR: 8369828: Generalize share/utilities/bytes.hpp [v3]
Justin King
jcking at openjdk.org
Wed Oct 15 13:58:45 UTC 2025
On Tue, 14 Oct 2025 15:03:18 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:
>> Justin King has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Replace STATIC_ASSERT with static_assert
>>
>> Signed-off-by: Justin King <jcking at google.com>
>
> src/hotspot/share/utilities/unalignedAccess.hpp line 61:
>
>> 59: static T load(const void* ptr) {
>> 60: STATIC_ASSERT(std::is_trivially_copyable<T>::value);
>> 61: STATIC_ASSERT(std::is_trivially_default_constructible<T>::value);
>
> Don't use `STATIC_ASSERT` in new code; use `static_assert`. C++17 changed `static_assert` to
> support uses without a message string.
Ah, just assumed we were still using STATIC_ASSERT style-wise. Updated.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/27801#discussion_r2432659753
More information about the hotspot-dev
mailing list