Why do C++ sequence containers have an “assign” method but associative containers do not?
The C++ sequence containers
(vector
, forward_list
, list
, and deque
)
all have an assign
method. For example, std::vector
has
(quoting cppreference.com):