std::vector::capacity
STD::向量::容量
size_type capacity() const; | | |
---|
返回容器当前已为其分配空间的元素数。
参数
%280%29
返回值
当前分配的存储空间的容量。
例外
(none) | (until C++11) |
---|---|
noexcept specification: noexcept | (since C++11) |
复杂性
常量。
另见
size | returns the number of elements (public member function) |
---|---|
reserve | reserves storage (public member function) |
© cppreference.com
在CreativeCommonsAttribution下授权-ShareAlike未移植许可v3.0。