学会用参考资料
http://www.cplusplus.com/reference/set/set/insert/
Complexity
If a single element is inserted, logarithmic in size in general, but amortized constant if a hint is given and the position given is the optimal.
If N elements are inserted, Nlog(size+N).
Implementations may optimize if the range is already sorted.
Iterator validity
No changes.
Data races
The container is modified.
Concurrently accessing existing elements is safe, although iterating ranges in the container is not.
【 在 softsongs 的大作中提到: 】
: 因为迭代器只保存了指针吧,所以不受insert 影响。
:
--
FROM 60.186.223.*