다음을 통해 공유


unordered_multiset::end

제어되는 시퀀스의 끝을 지정합니다.

iterator end();
    const_iterator end() const;
    local_iterator end(size_type nbucket);
    const_local_iterator end(size_type nbucket) const;

매개 변수

  • nbucket
    버킷 수입니다.

설명

첫 번째 두 명의 멤버 함수는 시퀀스의 끝 바로 뒤를 가리키는 정방향 반복기를 반환합니다.마지막으로 두 명의 멤버 함수 통 끝 바로 뒤를 가리키는 정방향 반복기를 반환 nbucket.

예제

 

// std_tr1__unordered_set__unordered_multiset_end.cpp 
// compile with: /EHsc 
#include <unordered_set> 
#include <iostream> 
 
typedef std::unordered_multiset<char> Myset; 
int main() 
    { 
    Myset c1; 
 
    c1.insert('a'); 
    c1.insert('b'); 
    c1.insert('c'); 
 
// display contents " [c] [b] [a]" 
    for (Myset::const_iterator it = c1.begin(); 
        it != c1.end(); ++it) 
        std::cout << " [" << *it << "]"; 
    std::cout << std::endl; 
 
// inspect last two items " [a] [b]" 
    Myset::iterator it2 = c1.end(); 
    --it2; 
    std::cout << " [" << *it2 << "]"; 
    --it2; 
    std::cout << " [" << *it2 << "]"; 
    std::cout << std::endl; 
 
// inspect bucket containing 'a' 
    Myset::const_local_iterator lit = c1.end(c1.bucket('a')); 
    --lit; 
    std::cout << " [" << *lit << "]"; 
 
    return (0); 
    } 
 
  

요구 사항

헤더: <unordered_set>

네임 스페이스: 국방 표준

참고 항목

참조

<unordered_set>

unordered_multiset Class

unordered_multiset::begin

기타 리소스

<unordered_set> 멤버