summaryrefslogtreecommitdiffstats
path: root/libcxx/test/containers/associative/set/empty.pass.cpp
blob: 2d2dba98eb3c6cd535108ab09454ea2426023dad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
//===----------------------------------------------------------------------===//
//
//                     The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//

// <set>

// class set

// bool empty() const;

#include <set>
#include <cassert>

int main()
{
    typedef std::set<int> M;
    M m;
    assert(m.empty());
    m.insert(M::value_type(1));
    assert(!m.empty());
    m.clear();
    assert(m.empty());
}
OpenPOWER on IntegriCloud