Withdrawn: JDK-8299688: Adopt C++14 compatible std::bit_cast introduced in C++20

Justin King jcking at openjdk.org
Tue Feb 7 17:33:09 UTC 2023


On Thu, 5 Jan 2023 18:04:29 GMT, Justin King <jcking at openjdk.org> wrote:

> Adopts a C++14 compatible implementation of [std::bit_cast](https://en.cppreference.com/w/cpp/numeric/bit_cast).
> 
> `PrimitiveConversions::cast` is refactored into `bit_cast` and extended to support all compatible types. Additionally it makes use of `__builtin_bit_cast` when available, which is strictly well defined compared to fallback approaches which are sometimes lurking in undefined behavior territory.
> 
> Lastly some legacy casting is updated to use `bit_cast` in `utilities/globalDefinitions.hpp`.

This pull request has been closed without being integrated.

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

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


More information about the hotspot-dev mailing list