-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GH-41536: [C++] Replace std::aligned_storage that is deprecated in C++23 #45019
Conversation
|
It seems that the i386 path is used by Debian 10 reached EOL and we're using Debian 12. So we can remove the workaround for i386. |
c86bfe0
to
62c6887
Compare
@github-actions crossbow submit -g cpp |
Revision: 62c6887 Submitted crossbow builds: ursacomputing/crossbow @ actions-3dd272f526 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, thank you @sjoubert . CI failures are unrelated, I'll merge.
After merging your PR, Conbench analyzed the 3 benchmarking runs that have been run so far on merge-commit 51d380c. There were no benchmark performance regressions. 🎉 The full Conbench report has more details. It also includes information about 11 possible false positives for unstable benchmarks that are known to sometimes produce them. |
This fixes #41536
Rationale for this change
C++23 deprecates
std::aligned_storage
. The recommended alternative is an array ofstd::byte
properly marked withalignas()
. 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 of
std::aligned_storage
in a conditional to work around a GCC bug on i386:alignas
as a replacement would have the same bug as the originalalignof
If someone can confirm that it is ok to clean the code and use the same code unconditionally I'll update my changes.