[libcxx-commits] [libcxx] [libc++] Ues _LIBCPP_NO_UNIQUE_ADDRESS for the new vetor layout (PR #207149)
Nikolas Klauser via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Jul 2 02:34:19 PDT 2026
https://github.com/philnik777 created https://github.com/llvm/llvm-project/pull/207149
We use `_LIBCPP_NO_UNIQUE_ADDRESS`, since a plain `[[no_unique_address]]` doesn't work on Windows.
>From 1d328f9eb40ca18bc8002cfc132eae8aa498fc4a Mon Sep 17 00:00:00 2001
From: Nikolas Klauser <nikolasklauser at berlin.de>
Date: Thu, 2 Jul 2026 11:33:21 +0200
Subject: [PATCH] [libc++] Ues _LIBCPP_NO_UNIQUE_ADDRESS for the new vetor
layout
---
libcxx/include/__vector/layout.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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