std::flat_multimap<Key,T,Compare,KeyContainer,MappedContainer>:: size
From cppreference.net
<
cpp
|
container
|
flat multimap
C++
Containers library
|
(C++17)
|
||||
| Sequence | ||||
|
(C++11)
|
||||
|
(C++26)
|
||||
|
(C++26)
|
||||
|
(C++11)
|
||||
| Associative | ||||
| Unordered associative | ||||
|
(C++11)
|
||||
|
(C++11)
|
||||
|
(C++11)
|
||||
|
(C++11)
|
||||
| Adaptors | ||||
|
(C++23)
|
||||
|
(C++23)
|
||||
|
(C++23)
|
||||
|
(C++23)
|
||||
| Views | ||||
|
(C++20)
|
||||
|
(C++23)
|
||||
| Tables | ||||
| Iterator invalidation | ||||
| Member function table | ||||
| Non-member function table |
std::flat_multimap
|
size_type size
(
)
const
noexcept
;
|
(C++23 이후) | |
컨테이너 어댑터의 요소 개수를 반환합니다. 다음과 동일합니다:
return
c
.
keys
.
size
(
)
.
목차 |
매개변수
(없음)
반환값
컨테이너 어댑터의 요소 개수입니다.
복잡도
상수.
예제
이 코드 실행
#include <cassert> #include <flat_map> int main() { std::flat_multimap<int, char> nums{{1, 'a'}, {1, 'b'}, {2, 'c'}, {2, 'd'}}; assert(nums.size() == 4); }
참고 항목
|
컨테이너 어댑터가 비어 있는지 확인합니다
(public member function) |
|
|
(C++17)
(C++20)
|
컨테이너나 배열의 크기를 반환합니다
(function template) |
|
가능한 최대 원소 개수를 반환합니다
(public member function) |