Commits


Sylvain Joubert authored and GitHub committed 51d380cfe65
GH-41536: [C++] Replace std::aligned_storage that is deprecated in C++23 (#45019) This fixes #41536 ### Rationale for this change C++23 deprecates `std::aligned_storage`. The recommended alternative is an array of `std::byte` properly marked with `alignas()`. This change is compatible with C++17 and should also allow users to compile their code in C++23 mode without deprecation warnings. ### What changes are included in this PR? This replaces `std::aligned_storage` as recommended and also removes a preprocessor define that was needed for MSVC. However there is still [one usage](https://github.com/apache/arrow/blob/main/cpp/src/arrow/util/aligned_storage.h#L122-L139) of `std::aligned_storage` in a conditional to work around a GCC bug on i386: * I don't know if `alignas` as a replacement would have the same bug as the original `alignof` * The original bug seems to be fixed but I'm not sure in which GCC version and I also don't know which minimal version of GCC needs to be supported by the arrow project If someone can confirm that it is ok to clean the code and use the same code unconditionally I'll update my changes. * GitHub Issue: #41536 Authored-by: Sylvain Joubert <joubert.sy@gmail.com> Signed-off-by: Antoine Pitrou <antoine@python.org>