[libcxx-commits] [libcxx] [libc++] Fix insert() calling incorrect constructors (PR #146231)

Richard Smith via libcxx-commits libcxx-commits at lists.llvm.org
Tue Jul 15 06:16:40 PDT 2025


================
@@ -744,7 +744,7 @@ public:
   _LIBCPP_HIDE_FROM_ABI const_iterator begin() const { return __table_.begin(); }
   _LIBCPP_HIDE_FROM_ABI const_iterator end() const { return __table_.end(); }
 
-  _LIBCPP_HIDE_FROM_ABI iterator insert(const value_type& __x) { return __table_.__insert_multi(__x); }
+  _LIBCPP_HIDE_FROM_ABI iterator insert(const value_type& __x) { return __table_.__emplace_unique(__x); }
----------------
zygoloid wrote:

Should this be `emplace_multi` not `emplace_unique`?

https://github.com/llvm/llvm-project/pull/146231


More information about the libcxx-commits mailing list