RFR: JDK-8300265: Remove metaprogramming/isSigned.hpp

Kim Barrett kbarrett at openjdk.org
Wed Jan 18 15:11:22 UTC 2023


On Tue, 17 Jan 2023 14:29:41 GMT, Justin King <jcking at openjdk.org> wrote:

> Code cleanup of pre-C++11 <type_traits> implementations.

Looks good.

src/hotspot/share/memory/metaspace/counters.hpp line 47:

> 45: 
> 46:   // Only allow unsigned values for now
> 47:   STATIC_ASSERT(std::is_signed<T>::value == false);

[pre-existing] I was going to say that we use `! _bool-expr_` rather than
`_bool-expr_ == false`, and I thought that was in the Style Guide.  But it
seems I was wrong about the Style Guide, and there are a surprising (to me)
number of occurrences of this sort of thing in our code (> 200).

src/hotspot/share/memory/metaspace/counters.hpp line 47:

> 45: 
> 46:   // Only allow unsigned values for now
> 47:   STATIC_ASSERT(std::is_signed<T>::value == false);

[pre-existing] Perhaps these should also be testing for `std::is_integral`,
since that is not implied by `std::is_signed`.  Although in the atomic case that
will fall out implicitly since we don't support atomic arithmetic on floating
point values.

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

Marked as reviewed by kbarrett (Reviewer).

PR: https://git.openjdk.org/jdk/pull/12042


More information about the hotspot-dev mailing list