This addresses the usage of operator& in <unordered_map>.
(Note there are still more headers with the same issue.)
Paths
| Differential D117393
[libc++] Use addressof in unordered_map. ClosedPublic Authored by Mordante on Jan 15 2022, 4:01 AM.
Details
Summary This addresses the usage of operator& in <unordered_map>. (Note there are still more headers with the same issue.)
Diff Detail
Event TimelineComment Actions Obviously looks basically fine, but I have some significant test comments, I think.
This revision now requires changes to proceed.Jan 15 2022, 6:31 AM Mordante added inline comments.
Mordante added inline comments.
• Quuxplusone added inline comments.
Comment Actions What is the reasoning for which member functions should be checked?
This revision is now accepted and ready to land.Jan 20 2022, 8:22 AM Comment Actions
Basically I add tests for things that aren't ADL-hijacking proof. So basically they are regression tests. Comment Actions
They didn't fail for me, so I haven't been able get test failure with them. So I prefer the whack-a-mole approach for this. Writing tests for all possible cases seems a lot of work with little benefit. But feel free to add additional tests. Closed by commit rGcab961693802: [libc++] Use addressof in unordered_map. (authored by Mordante). · Explain WhyJan 21 2022, 8:34 AM This revision was automatically updated to reflect the committed changes. Mordante added a reverting change: rGe4a556268ea9: Revert "[libc++] Use addressof in unordered_map.".Jan 21 2022, 8:59 AM This revision is now accepted and ready to land.Jan 21 2022, 9:10 AM Closed by commit rGd6e2c95d2252: [libc++] Use addressof in unordered_map. (authored by Mordante). · Explain WhyJan 21 2022, 11:43 AM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 402058 libcxx/include/__hash_table
libcxx/include/unordered_map
libcxx/test/std/containers/unord/unord.map/iterator.operators.addressof.compile.pass.cpp
libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/assign_move.addressof.compile.pass.cpp
libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/move.addressof.compile.pass.cpp
libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/move_alloc.addressof.compile.pass.cpp
libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/emplace_hint.addressof.compile.pass.cpp
libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/erase_const_iter.addressof.compile.pass.cpp
libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/erase_range.addressof.compile.pass.cpp
libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/insert_hint_const_lvalue.addressof.compile.pass.cpp
libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/insert_rvalue_constructible_value_type.addressof.compile.pass.cpp
libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/insert_rvalue_value_type.addressof.compile.pass.cpp
libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/try_emplace_hint.addressof.compile.pass.cpp
libcxx/test/std/containers/unord/unord.map/unord.map.swap/swap.addressof.compile.pass.cpp
libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/move.addressof.compile.pass.cpp
libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/move_alloc.addressof.compile.pass.cpp
libcxx/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/emplace_hint.addressof.compile.pass.cpp
|
@Quuxplusone Just a pointer to the code I refer to later.