]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
include/function2.hpp: avoid using std::aligned_storage_t 64524/head
authorKefu Chai <tchaikov@gmail.com>
Wed, 16 Jul 2025 05:59:01 +0000 (13:59 +0800)
committerKefu Chai <tchaikov@gmail.com>
Wed, 16 Jul 2025 08:52:33 +0000 (16:52 +0800)
commit1002fe77bd8cce72ad03d75e50894c03ffab9ede
tree5618e5266b121f19bd1cf5c6bfee75b919e95aa7
parent917a2dde418d519dfd8105177725ccedab3e82fe
include/function2.hpp: avoid using std::aligned_storage_t

std::aligned_storage_t was deprecated in C++23, now that we've switched
to C++23. let's address the warning like:

```
In file included from /mnt/igor/github/salieri11/ceph/src/osdc/Objecter.cc:15:
In file included from /mnt/igor/github/salieri11/ceph/src/osdc/Objecter.h:44:
/mnt/igor/github/salieri11/ceph/src/include/function2.hpp:962:10: error: 'aligned_storage_t' is deprecated [-Werror,-Wdeprecated-declarations]
  962 |     std::aligned_storage_t<Capacity> capacity_;
```

in this change, we

- update function2.hpp with upstream
- apply the fix to trade std::aligned_storage_t with an alignas-based
  equivalent implementation

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