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

Mark de Wever via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu Sep 17 11:54:28 PDT 2020


Mordante marked an inline comment as done.
Mordante added inline comments.


================
Comment at: libcxx/include/map:1276
+                                                        _Vp&& __v) {
+      auto [__r, __inserted] = __tree_.__emplace_hint_unique_key_args(
+          __h.__i_, __k, __k, _VSTD::forward<_Vp>(__v));
----------------
ldionne wrote:
> You can't use structured bindings here, this is supposed to work before C++17.
I used the structured bindings since the code is ifdef'ed at line 1204 with `#if _LIBCPP_STD_VER > 14` so I assumed it wasn't intended to be used prior to C++17. But no problem to use a pair.


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

https://reviews.llvm.org/D62779



More information about the libcxx-commits mailing list