llvm-project/libcxx/test/std/containers/associative/multiset/multiset.cons/default.pass.cpp

41 lines
840 B
C++
Raw Normal View History

2010-05-12 03:42:16 +08:00
//===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
2010-05-12 03:42:16 +08:00
//
2010-11-17 06:09:02 +08:00
// This file is dual licensed under the MIT and the University of Illinois Open
// Source Licenses. See LICENSE.TXT for details.
2010-05-12 03:42:16 +08:00
//
//===----------------------------------------------------------------------===//
// <set>
// class multiset
// multiset();
#include <set>
#include <cassert>
#include "min_allocator.h"
2010-05-12 03:42:16 +08:00
int main()
{
{
2010-05-12 03:42:16 +08:00
std::multiset<int> m;
assert(m.empty());
assert(m.begin() == m.end());
}
#if __cplusplus >= 201103L
{
std::multiset<int, std::less<int>, min_allocator<int>> m;
assert(m.empty());
assert(m.begin() == m.end());
}
{
std::multiset<int> m = {};
assert(m.empty());
assert(m.begin() == m.end());
}
#endif
2010-05-12 03:42:16 +08:00
}