I understand the semantics of the 2 operations , assign- erases before replacing with supplied values. insert - inserts values at specified location(allocates new memory if necessary).
Apart from this is there any reason to preffer one over the other? Or to put it another way, is there any reason to use assign instead of insert.