瀏覽代碼

alignment: Specify trait definitions within the allocator

Allows containers and other data structures to consider optimizations
based off of them. We satisfy all of these requirements anyways.
Lioncash 6 年之前
父節點
當前提交
9aafb2a277
共有 1 個文件被更改,包括 5 次插入0 次删除
  1. 5 0
      src/common/alignment.h

+ 5 - 0
src/common/alignment.h

@@ -51,6 +51,11 @@ public:
     using reference = T&;
     using const_reference = const T&;
 
+    using propagate_on_container_copy_assignment = std::true_type;
+    using propagate_on_container_move_assignment = std::true_type;
+    using propagate_on_container_swap = std::true_type;
+    using is_always_equal = std::true_type;
+
 public:
     pointer address(reference r) noexcept {
         return std::addressof(r);