[PATCH] D47607: [libcxx] Almost fix some UB in <map> and <unordered_map>

Erik Pilkington via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jun 1 06:26:05 PDT 2018


erik.pilkington added a comment.

In https://reviews.llvm.org/D47607#1118547, @EricWF wrote:

> I should have asked, have we actually seen a midcompile caused by this? Is there a reproducer? Or is this purerly speculative?


Nope, pure speculation. I still think we should still fix this though.



================
Comment at: libcxx/include/map:648
+    _LIBCPP_INLINE_VISIBILITY
+    __nc_ref_pair_type __ref()
+    {
----------------
EricWF wrote:
> I think `__ref` can be private.
That's true for this patch, but I'm planning on using `__ref` in `__node_handle` to implement key() and mapped() so we don't have to duplicate the const cast.


https://reviews.llvm.org/D47607





More information about the cfe-commits mailing list