llvm-project
33 строки · 852.0 Байт
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// <set>
10
11// class set
12
13// set(const value_compare& comp, const allocator_type& a);
14
15#include <set>
16#include <cassert>
17
18#include "test_macros.h"
19#include "../../../test_compare.h"
20#include "test_allocator.h"
21
22int main(int, char**)
23{
24typedef test_less<int> C;
25typedef test_allocator<int> A;
26std::set<int, C, A> m(C(4), A(5));
27assert(m.empty());
28assert(m.begin() == m.end());
29assert(m.key_comp() == C(4));
30assert(m.get_allocator() == A(5));
31
32return 0;
33}
34