]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
include: buffer_raw.h uses C++11-compatible std::aligned_storage.
authorRadoslaw Zarzynski <rzarzyns@redhat.com>
Sun, 4 Nov 2018 20:44:54 +0000 (21:44 +0100)
committerRadoslaw Zarzynski <rzarzyns@redhat.com>
Sun, 2 Dec 2018 23:49:34 +0000 (00:49 +0100)
Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
src/include/buffer_raw.h

index 301e2ca99c1aaaaf79b97b140e0a030aa58aeea1..217d06f3e8d0f50285e6c97bccffe0ee5da9cf67 100644 (file)
@@ -28,7 +28,8 @@ namespace ceph::buffer {
   public:
     // In the future we might want to have a slab allocator here with few
     // embedded slots. This would allow to avoid the "if" in dtor of ptr_node.
-    std::aligned_storage_t<sizeof(ptr_node), alignof(ptr_node)> bptr_storage;
+    std::aligned_storage<sizeof(ptr_node),
+                        alignof(ptr_node)>::type bptr_storage;
     char *data;
     unsigned len;
     std::atomic<unsigned> nref { 0 };