Skip to content

Commit 337beb7

Browse files
philnik777tstellar
authored andcommitted
[libc++] Add _LIBCPP_NO_UNIQUE_ADDRESS to flat_{,multi}map::value_compare (#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. (cherry picked from commit ed0aa99)
1 parent b8e10ca commit 337beb7

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
@@ -113,7 +113,7 @@ class flat_map {
113113

114114
class value_compare {
115115
private:
116-
key_compare __comp_;
116+
_LIBCPP_NO_UNIQUE_ADDRESS key_compare __comp_;
117117
_LIBCPP_HIDE_FROM_ABI value_compare(key_compare __c) : __comp_(__c) {}
118118
friend flat_map;
119119

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)