[libcxx-commits] [libcxx] 4fad93b - [libc++] Use _LIBCPP_NO_UNIQUE_ADDRESS for the new vector layout (#207149)
via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Jul 2 19:22:50 PDT 2026
Author: Nikolas Klauser
Date: 2026-07-03T04:22:45+02:00
New Revision: 4fad93b912c954720de1b2b63a0f00679dc96550
URL: https://github.com/llvm/llvm-project/commit/4fad93b912c954720de1b2b63a0f00679dc96550
DIFF: https://github.com/llvm/llvm-project/commit/4fad93b912c954720de1b2b63a0f00679dc96550.diff
LOG: [libc++] Use _LIBCPP_NO_UNIQUE_ADDRESS for the new vector layout (#207149)
We use `_LIBCPP_NO_UNIQUE_ADDRESS`, since a plain
`[[no_unique_address]]` doesn't work on Windows.
Added:
Modified:
libcxx/include/__vector/layout.h
Removed:
################################################################################
diff --git a/libcxx/include/__vector/layout.h b/libcxx/include/__vector/layout.h
index 65d11aa238df0..910078b1e760e 100644
--- a/libcxx/include/__vector/layout.h
+++ b/libcxx/include/__vector/layout.h
@@ -217,7 +217,7 @@ class __vector_layout {
#ifdef _LIBCPP_ABI_VECTOR_LAYOUT_SIZE_BASED
size_type __size_ = 0;
size_type __capacity_ = 0;
- [[no_unique_address]] allocator_type __alloc_;
+ _LIBCPP_NO_UNIQUE_ADDRESS allocator_type __alloc_;
#else
pointer __end_ = nullptr;
_LIBCPP_COMPRESSED_PAIR(pointer, __capacity_ = nullptr, allocator_type, __alloc_);
More information about the libcxx-commits
mailing list