llvm-project
56 строк · 1.3 Кб
1//===----------------------------------------------------------------------===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8
9// <map>
10
11// class multimap
12
13// multimap();
14
15#include <map>16#include <cassert>17
18#include "test_macros.h"19#include "min_allocator.h"20
21int main(int, char**)22{
23{24std::multimap<int, double> m;25assert(m.empty());26assert(m.begin() == m.end());27}28#if TEST_STD_VER >= 1129{30std::multimap<int, double, std::less<int>, min_allocator<std::pair<const int, double>>> m;31assert(m.empty());32assert(m.begin() == m.end());33}34{35typedef explicit_allocator<std::pair<const int, double>> A;36{37std::multimap<int, double, std::less<int>, A> m;38assert(m.empty());39assert(m.begin() == m.end());40}41{42A a;43std::multimap<int, double, std::less<int>, A> m(a);44assert(m.empty());45assert(m.begin() == m.end());46}47}48{49std::multimap<int, double> m = {};50assert(m.empty());51assert(m.begin() == m.end());52}53#endif54
55return 0;56}
57