std::list<T,Allocator>::size
来自 cppreference.cn
size_type size() const; |
(until C++11) | |
size_type size() const noexcept; |
(since C++11) | |
返回容器中元素的数量,即 std::distance(begin(), end())。
目录 |
[edit] 参数
(无)
[edit] 返回值
容器中元素的数量。
[edit] 复杂度
常数或线性。 | (until C++11) |
常数。 | (since C++11) |
[edit] 示例
[edit] 参见
检查容器是否为空 (public member function) | |
返回可能的最大元素数量 (public member function) | |
更改存储的元素数量 (public member function) |