Victor Hugo Vianna Silva a6f35491d6 [cpp23] Remove use of std::aligned_storage in webrtc
std::aligned_storage is deprecated in C++23, see linked bug. The only
webrtc usage (VoidUnion::inline_storage) employed the default Align
parameter (i.e. std::aligned_storage<Len>, not std::aligned_storage<Len,
Alignment>), which is defined as the largest alignment <= Len.

This patch replaces the usage with a char buffer of same size and
alignment alignof(std::max_align_t). In theory, this might increase
alignment and use more memory. In practice, local testing in my
machines showed no behavior change, since Len =
kInlineStorageWords * sizeof(uintptr_t) = 32 > 16 (maximum alignment
on linux x86_64) > 8 (maximum alignment on mac arm64).


Bug: chromium:388068052
Change-Id: If08b69f7a5ff7b716a66c8703e31eb5d4de14431
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/373800
Commit-Queue: Victor Vianna <victorvianna@google.com>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Auto-Submit: Victor Vianna <victorvianna@google.com>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43842}
2025-02-03 07:04:52 -08:00
..
2025-01-08 11:20:49 -08:00
2025-01-08 11:20:49 -08:00
2025-01-08 11:20:49 -08:00
2024-12-03 12:17:02 +00:00
2023-04-21 06:17:42 +00:00
2024-08-09 14:58:10 +00:00
2025-01-08 11:20:49 -08:00
2023-04-21 06:17:42 +00:00
2024-10-31 15:31:38 +00:00
2024-04-24 20:53:23 +00:00
2022-01-28 15:13:45 +00:00
2023-04-21 06:17:42 +00:00
2024-12-19 07:37:19 -08:00
2024-08-14 07:11:57 +00:00
2023-04-21 06:17:42 +00:00
2021-08-31 14:27:49 +00:00
2024-02-01 14:43:30 +00:00
2024-02-01 14:43:30 +00:00
2024-06-07 09:47:26 +00:00
2024-06-07 09:47:26 +00:00
2024-08-14 07:11:57 +00:00
2024-02-01 14:43:30 +00:00
2024-12-19 07:37:19 -08:00
2024-12-19 07:37:19 -08:00
2025-01-08 11:20:49 -08:00
2023-04-21 06:17:42 +00:00
2021-09-21 15:17:26 +00:00
2025-01-08 11:20:49 -08:00
2024-06-07 09:47:26 +00:00