Commit 74644aa
committed
include/any.h: 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 `immobile_any`, 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 <[email protected]>1 parent 379637e commit 74644aa
1 file changed
+9
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| |||
491 | 492 | | |
492 | 493 | | |
493 | 494 | | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
494 | 500 | | |
495 | 501 | | |
496 | 502 | | |
| |||
508 | 514 | | |
509 | 515 | | |
510 | 516 | | |
511 | | - | |
512 | | - | |
513 | | - | |
| 517 | + | |
| 518 | + | |
514 | 519 | | |
515 | 520 | | |
516 | | - | |
| 521 | + | |
517 | 522 | | |
518 | 523 | | |
519 | 524 | | |
| |||
0 commit comments