RFR: JDK-8299395: Remove metaprogramming/removeCV.hpp [v2]
Kim Barrett
kbarrett at openjdk.org
Thu Dec 29 07:18:50 UTC 2022
On Thu, 29 Dec 2022 02:59:17 GMT, Justin King <jcking at openjdk.org> wrote:
>> Code cleanup of pre-C++11 <type_traits> implementations.
>
> 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>
Marked as reviewed by kbarrett (Reviewer).
Changes requested by kbarrett (Reviewer).
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.
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>`.
-------------
PR: https://git.openjdk.org/jdk/pull/11799
More information about the hotspot-runtime-dev
mailing list