Relates :
|
Forbid the use of std::aligned_storage and std::aligned_union in HotSpot. These are defined in <type_traits>, which is otherwise permitted for use. There is a proposal for deprecation (C++23) https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2021/p1413r3.pdf with a long list of problems with these types. Earlier versions of the paper contained proposed replacements, but the committee rejected that part, presumably because many of the issues can be addressed by just using alignas. Though that doesn't solve all problems, since reinterpret_cast is still needed, and alignas doesn't propagate through type aliases. https://www.reddit.com/r/cpp/comments/ceu0wd/why_are_stdaligned_storage_and_stdaligned_union/