RFR: JDK-8299395: Remove metaprogramming/removeCV.hpp [v2]

Justin King jcking at openjdk.org
Thu Dec 29 09:10:29 UTC 2022


On Thu, 29 Dec 2022 07:09:28 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:

>> Justin King has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Remove related test
>>   
>>   Signed-off-by: Justin King <jcking at google.com>
>
> src/hotspot/share/metaprogramming/decay.hpp line 39:
> 
>> 37: template <typename T>
>> 38: struct Decay: AllStatic {
>> 39:   typedef typename std::remove_cv<typename RemoveReference<T>::type>::type type;
> 
> Not that it really matters, since this code is going away shortly too, but:
> `using type = std::remove_cv_t<typename RemoveReference<T>::type>;`
> That is, use the `_t` suffixed traits when available.  And prefer type aliases now that we have them.

Done.

> src/hotspot/share/runtime/atomic.hpp line 798:
> 
>> 796:   typename EnableIf<Atomic::IsPointerConvertible<T*, D*>::value &&
>> 797:                     IsSame<typename std::remove_cv<D>::type,
>> 798:                            typename std::remove_cv<U>::type>::value>::type>
> 
> Prefer the `_t` suffixed traits here, e.g. `typename std::remove_cv<D>::type` => `std::remove_cv_t<D>`.

Done. Was going for the least amount of change originally.

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

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


More information about the hotspot-runtime-dev mailing list