Namespaces
Variants

std::unordered_multiset<Key,Hash,KeyEqual,Allocator>:: size

From cppreference.net

size_type size ( ) const noexcept ;
(C++11부터)
(C++26부터 constexpr)

컨테이너의 요소 개수를 반환합니다.

목차

반환값

std:: distance ( begin ( ) , end ( ) )

복잡도

상수.

예제

#include <cassert>
#include <unordered_set>
int main()
{
    std::unordered_multiset<int> nums{4, 2, 4, 2};
    assert(nums.size() == 4);
}

참고 항목

컨테이너가 비어 있는지 확인합니다
(public member function)
가능한 최대 원소 개수를 반환합니다
(public member function)
(C++17) (C++20)
컨테이너나 배열의 크기를 반환합니다
(function template)