Skip to content

Commit ed0aa99

Browse files
authored
[libc++] Add _LIBCPP_NO_UNIQUE_ADDRESS to flat_{,multi}map::value_compare (llvm#137594)
This breaks the ABI of `flat_{,multi}map::value_compare`, but this type has only been introduced in LLVM 20, so it should be very unlikely that we break anybody if we back-port this now.
1 parent b59ab70 commit ed0aa99

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

libcxx/include/__flat_map/flat_map.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ class flat_map {
114114

115115
class value_compare {
116116
private:
117-
key_compare __comp_;
117+
_LIBCPP_NO_UNIQUE_ADDRESS key_compare __comp_;
118118
_LIBCPP_HIDE_FROM_ABI value_compare(key_compare __c) : __comp_(__c) {}
119119
friend flat_map;
120120

libcxx/include/__flat_map/flat_multimap.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ class flat_multimap {
115115

116116
class value_compare {
117117
private:
118-
key_compare __comp_;
118+
_LIBCPP_NO_UNIQUE_ADDRESS key_compare __comp_;
119119
_LIBCPP_HIDE_FROM_ABI value_compare(key_compare __c) : __comp_(__c) {}
120120
friend flat_multimap;
121121

0 commit comments

Comments
 (0)