2010-05-12 03:42:16 +08:00
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
//
|
2019-01-19 18:56:40 +08:00
|
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
2010-05-12 03:42:16 +08:00
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
// <set>
|
|
|
|
|
|
|
|
// class multiset
|
|
|
|
|
|
|
|
// multiset();
|
|
|
|
|
|
|
|
#include <set>
|
|
|
|
#include <cassert>
|
|
|
|
|
2013-11-27 04:58:02 +08:00
|
|
|
#include "min_allocator.h"
|
2013-06-20 05:29:40 +08:00
|
|
|
|
2010-05-12 03:42:16 +08:00
|
|
|
int main()
|
|
|
|
{
|
2013-06-20 05:29:40 +08:00
|
|
|
{
|
2010-05-12 03:42:16 +08:00
|
|
|
std::multiset<int> m;
|
|
|
|
assert(m.empty());
|
|
|
|
assert(m.begin() == m.end());
|
2013-06-20 05:29:40 +08:00
|
|
|
}
|
2016-06-15 05:31:42 +08:00
|
|
|
#if TEST_STD_VER >= 11
|
2013-06-20 05:29:40 +08:00
|
|
|
{
|
|
|
|
std::multiset<int, std::less<int>, min_allocator<int>> m;
|
|
|
|
assert(m.empty());
|
|
|
|
assert(m.begin() == m.end());
|
|
|
|
}
|
2014-03-06 03:06:20 +08:00
|
|
|
{
|
2016-08-17 13:58:40 +08:00
|
|
|
typedef explicit_allocator<int> A;
|
|
|
|
{
|
|
|
|
std::multiset<int, std::less<int>, A> m;
|
|
|
|
assert(m.empty());
|
|
|
|
assert(m.begin() == m.end());
|
|
|
|
}
|
|
|
|
{
|
|
|
|
A a;
|
|
|
|
std::multiset<int, std::less<int>, A> m(a);
|
|
|
|
assert(m.empty());
|
|
|
|
assert(m.begin() == m.end());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
{
|
2014-03-06 03:06:20 +08:00
|
|
|
std::multiset<int> m = {};
|
|
|
|
assert(m.empty());
|
|
|
|
assert(m.begin() == m.end());
|
|
|
|
}
|
2013-06-20 05:29:40 +08:00
|
|
|
#endif
|
2010-05-12 03:42:16 +08:00
|
|
|
}
|