다음을 통해 공유


deque::empty (STL/CLR)

요소가 없는지 여부 테스트를 제공 합니다.

    bool empty();

설명

멤버 함수에 대 한 빈 제어 시퀀스 true를 반환합니다.해당 하는 deque::size (STL/CLR)() == 0.있지 않은 deque 비어 있는지 여부를 테스트 하려면 사용 합니다.

예제

// cliext_deque_empty.cpp 
// compile with: /clr 
#include <cliext/deque> 
 
int main() 
    { 
    cliext::deque<wchar_t> c1; 
    c1.push_back(L'a'); 
    c1.push_back(L'b'); 
    c1.push_back(L'c'); 
 
// display initial contents " a b c" 
    for each (wchar_t elem in c1) 
        System::Console::Write(" {0}", elem); 
    System::Console::WriteLine(); 
    System::Console::WriteLine("size() = {0}", c1.size()); 
    System::Console::WriteLine("empty() = {0}", c1.empty()); 
 
// clear the container and reinspect 
    c1.clear(); 
    System::Console::WriteLine("size() = {0}", c1.size()); 
    System::Console::WriteLine("empty() = {0}", c1.empty()); 
    return (0); 
    } 
 
  

요구 사항

헤더: < cliext/있지 않은 deque >

네임 스페이스: cliext

참고 항목

참조

deque (STL/CLR)

deque::size (STL/CLR)