[libcxx-commits] [libcxx] [libc++] Replace `__compressed_pair` with `[[no_unique_address]]` (PR #76756)

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Thu Jan 25 09:23:51 PST 2024


================
@@ -725,8 +726,7 @@ public:
 private:
   pointer __begin_ = nullptr;
   pointer __end_   = nullptr;
-  __compressed_pair<pointer, allocator_type> __end_cap_ =
-      __compressed_pair<pointer, allocator_type>(nullptr, __default_init_tag());
+  _LIBCPP_COMPRESSED_PAIR(pointer, __cap_, allocator_type, __alloc_);
----------------
ldionne wrote:

You should be able to restore the `= nullptr` here and re-simplify the ctors after my suggestion to the macro.

https://github.com/llvm/llvm-project/pull/76756


More information about the libcxx-commits mailing list