[PATCH] D16791: unordered_map: Match emplace_hint logic when _LIBCPP_DEBUG, NFC
Duncan P. N. Exon Smith via cfe-commits
cfe-commits at lists.llvm.org
Mon Feb 1 17:41:08 PST 2016
dexonsmith created this revision.
dexonsmith added a reviewer: EricWF.
dexonsmith added a subscriber: cfe-commits.
When `!defined(_LIBCPP_DEBUG)`, unordered_map::emplace_hint() forwards
to emplace(). Do the same when `defined(_LIBCPP_DEBUG)`.
This has no real functionality change, just unifies the logic as a
prep commit.
http://reviews.llvm.org/D16791
Files:
include/unordered_map
Index: include/unordered_map
===================================================================
--- include/unordered_map
+++ include/unordered_map
@@ -932,7 +932,7 @@
_LIBCPP_ASSERT(__get_const_db()->__find_c_from_i(&__p) == this,
"unordered_map::emplace_hint(const_iterator, args...) called with an iterator not"
" referring to this unordered_map");
- return __table_.__emplace_unique(_VSTD::forward<_Args>(__args)...).first;
+ return emplace(_VSTD::forward<_Args>(__args)...).first;
}
#else
iterator emplace_hint(const_iterator, _Args&&... __args)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D16791.46601.patch
Type: text/x-patch
Size: 640 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160202/74cece56/attachment.bin>
More information about the cfe-commits
mailing list