1 //===----------------------------------------------------------------------===//
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
7 //===----------------------------------------------------------------------===//
11 // deque(const deque& c, const allocator_type& a);
16 #include "test_macros.h"
17 #include "test_allocator.h"
18 #include "min_allocator.h"
22 test(const C
& x
, const typename
C::allocator_type
& a
)
26 assert(c
.get_allocator() == a
);
32 int ab
[] = {3, 4, 2, 8, 0, 1, 44, 34, 45, 96, 80, 1, 13, 31, 45};
33 int* an
= ab
+ sizeof(ab
)/sizeof(ab
[0]);
34 test(std::deque
<int, test_allocator
<int> >(ab
, an
, test_allocator
<int>(3)),
35 test_allocator
<int>(4));
38 int ab
[] = {3, 4, 2, 8, 0, 1, 44, 34, 45, 96, 80, 1, 13, 31, 45};
39 int* an
= ab
+ sizeof(ab
)/sizeof(ab
[0]);
40 test(std::deque
<int, other_allocator
<int> >(ab
, an
, other_allocator
<int>(3)),
41 other_allocator
<int>(4));
43 #if TEST_STD_VER >= 11
45 int ab
[] = {3, 4, 2, 8, 0, 1, 44, 34, 45, 96, 80, 1, 13, 31, 45};
46 int* an
= ab
+ sizeof(ab
)/sizeof(ab
[0]);
47 test(std::deque
<int, min_allocator
<int> >(ab
, an
, min_allocator
<int>()),
48 min_allocator
<int>());