[libcxx-commits] [PATCH] D62779: [2/2] Fix complexity of map insert_or_assign with a hint.

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Sep 15 09:59:02 PDT 2020


ldionne requested changes to this revision.
ldionne added inline comments.
This revision now requires changes to proceed.


================
Comment at: libcxx/include/map:1274
+    {
+         return __tree_.__insert_or_assign_hint(__h.__i_, __k,  _VSTD::forward<_Vp>(__v));
+    }
----------------
I think it would be better if `__emplace_hint_unique_key_args` returned a pair of `bool` and `iterator`, like `__emplace_unique_key_args` does. We could then reuse it to implement this functionality. WDYT?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D62779/new/

https://reviews.llvm.org/D62779



More information about the libcxx-commits mailing list