The elements stored in the container before the call are either assigned to or destroyed.

Parameters

x

A multiset object of the same type (i.e., with the same template parameters, T, Compare and Alloc).

il

An initializer_list object. The compiler will automatically construct such objects from initializer list declarators.
Member type value_type is the type of the elements in the container, defined in multiset as an alias of its first template parameter (T).

Complexity

For the copy assignment (1): Linear in sizes (destructions, copies).
For the move assignment (2): Linear in current container size (destructions).*
For the initializer list assignment (3): Up to logarithmic in sizes (destructions, move-assignments) -- linear if il is already sorted.
* Additional complexity for assignments if allocators do not propagate.

Iterator validity

All iterators, references and pointers related to this container are invalidated.

In the move assignment, iterators, pointers and references referring to elements in x are also invalidated.

Data races

All copied elements are accessed.
The move assignment (2) modifies x.
The container and all its elements are modified.

Exception safety

Basic guarantee: if an exception is thrown, the container is in a valid state.
If allocator_traits::construct is not supported with the appropriate arguments for the element constructions, or if value_type is not copy assignable (or move assignable for (2)), it causes undefined behavior.