[libcxx-commits] [libcxx] [libc++] Remove initializer_list specific optimization in __tree (PR #169413)

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Wed Dec 10 08:10:15 PST 2025


================
@@ -1015,7 +1015,8 @@ public:
 #    endif
 
   _LIBCPP_HIDE_FROM_ABI map& operator=(initializer_list<value_type> __il) {
-    __tree_.__assign_unique(__il.begin(), __il.end());
+    clear();
----------------
ldionne wrote:

It seems you're right. Neither https://eel.is/c++draft/container.requirements#container.reqmts-66 nor any of the referenced clauses specify something. So that must be the basic exception safety guarantee.

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


More information about the libcxx-commits mailing list