std::list<T,Allocator>::size
來自 cppreference.com
size_type size() const; |
(C++11 前) | |
size_type size() const noexcept; |
(C++11 起) | |
返回容器中的元素數量,即 std::distance(begin(), end())。
目錄 |
[編輯] 引數
(無)
[編輯] 返回值
容器中的元素數量。
[編輯] 複雜度
常數時間或線性時間。 | (C++11 前) |
常數時間。 | (C++11 起) |
[編輯] 示例
[編輯] 參閱
檢查容器是否為空 (public member function) | |
返回元素的最大可能數量 (public member function) | |
更改儲存的元素數量 (public member function) |