Skip to content

Commit 5e5a9ba

Browse files
authored
Merge pull request ceph#64041 from tchaikov/wip-buffer-raw-no-aligned_storage
include/buffer_raw: avoid using std::aligned_storage_t Reviewed-by: Patrick Donnelly <[email protected]>
2 parents 388cff0 + cb68064 commit 5e5a9ba

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/include/buffer_raw.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,9 @@ inline namespace v15_2_0 {
3030
public:
3131
// In the future we might want to have a slab allocator here with few
3232
// embedded slots. This would allow to avoid the "if" in dtor of ptr_node.
33-
std::aligned_storage<sizeof(ptr_node),
34-
alignof(ptr_node)>::type bptr_storage;
33+
struct alignas(ptr_node) {
34+
unsigned char data[sizeof(ptr_node)];
35+
} bptr_storage;
3536
protected:
3637
char *data;
3738
unsigned len;

0 commit comments

Comments
 (0)