std::set<Key,Compare,Allocator>::size
来自 cppreference.cn
size_type size() const; |
(noexcept since C++11) | |
返回容器中元素的数量,即 std::distance(begin(), end()) 的结果。
目录 |
[edit] 返回值
容器中元素的数量。
[edit] 复杂度
常数。
[edit] 示例
运行此代码
[edit] 参见
检查容器是否为空 (公共成员函数) | |
返回可能的最大元素数量 (公共成员函数) | |
(C++17)(C++20) |
返回容器或数组的大小 (函数模板) |