RFR: JDK-8299554: Remove EnableIf from metaprogramming/enableIf.hpp
Justin King
jcking at openjdk.org
Tue Jan 3 21:55:48 UTC 2023
On Tue, 3 Jan 2023 21:38:27 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:
>> @kimbarrett Cleanup EnableIf, but leave ENABLE_IF and ENABLE_IF_SDEFN as discussed. Also switched to `std::enable_if_t`.
>
>> @kimbarrett Cleanup EnableIf, but leave ENABLE_IF and ENABLE_IF_SDEFN as discussed. Also switched to `std::enable_if_t`.
>
> My suggestion here: https://github.com/openjdk/jdk/pull/11794#pullrequestreview-1231289245
> was to leave this one alone. I think (pretty nearly) all current uses of EnableIf would be better handled by refactoring
> to take advantage of C++17 if-constexpr. I think there's little point to this intermediate change if C++17 support is
> coming (which I'm hopeful that it is).
> > @kimbarrett Cleanup EnableIf, but leave ENABLE_IF and ENABLE_IF_SDEFN as discussed. Also switched to `std::enable_if_t`.
>
> My suggestion here: [#11794 (review)](https://github.com/openjdk/jdk/pull/11794#pullrequestreview-1231289245) was to leave this one alone. I think (pretty nearly) all current uses of EnableIf would be better handled by refactoring to take advantage of C++17 if-constexpr. I think there's little point to this intermediate change if C++17 support is coming (which I'm hopeful that it is).
Rewriting to use `if constexpr` is more involved than a simple replace. This is meant to just stop the bleeding and remove the alias.
-------------
PR: https://git.openjdk.org/jdk/pull/11835
More information about the hotspot-dev
mailing list