Skip to content

Commit cdf1e33

Browse files
authored
Merge pull request ceph#64071 from tchaikov/wip-static_ptr-alignas
common/static_ptr: pass an integer to alignas to fix GCC-11 build fai… Reviewed-by: Casey Bodley <[email protected]>
2 parents f35c58a + e5d6aaf commit cdf1e33

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/common/static_ptr.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,8 @@ class static_ptr {
101101
// difference in semantics between a pointer-to-const and a const
102102
// pointer.
103103
//
104-
mutable struct alignas(std::bit_ceil(Size)) {
104+
static constexpr std::size_t Alignment = std::bit_ceil(Size);
105+
mutable struct alignas(Alignment) {
105106
unsigned char data[sizeof(Base)];
106107
} buf;
107108

0 commit comments

Comments
 (0)