]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
neorados: avoid using std::aligned_storage_t 64037/head
authorKefu Chai <tchaikov@gmail.com>
Thu, 19 Jun 2025 08:52:59 +0000 (16:52 +0800)
committerKefu Chai <tchaikov@gmail.com>
Thu, 19 Jun 2025 08:56:33 +0000 (16:56 +0800)
commitba7b42983cc6e1966f9149cc6160a4ae6154f9e0
tree36f82524a6abbad20af69e09282ae9f80595a1d9
parent0c95e42ecfe46e4d35777dbe0fb23cbc00804eb3
neorados: avoid using std::aligned_storage_t

std::aligned_storage_t was deprecated in C++23, to be prepared for
it, let's use alignas for the same behavior. because we do not always
pass a power-of-2 number to `std::aligned_storage_t`, while `alignas()`
requires an alignment of power of 2. so we use `std::bit_ceil()` to
calculate the minimum alignment greater or equal to the given number.

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
src/include/neorados/RADOS.hpp