Is `std::vector<primitive>::clear()` a constant time operation?
Asked 2013-02-20T00:41:28.447
11
Calling clear() on a vector will call the destructors of whatever is stored in the vector, which is a linear time operation. But is this the case when the vector contains primitive types like int or double?