1//===----------------------------------------------------------------------===//
2//
3//                     The LLVM Compiler Infrastructure
4//
5// This file is dual licensed under the MIT and the University of Illinois Open
6// Source Licenses. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9
10// <deque>
11
12// explicit deque(const allocator_type& a);
13
14#include <deque>
15#include <cassert>
16
17#include "test_allocator.h"
18#include "../../../NotConstructible.h"
19#include "min_allocator.h"
20
21template <class T, class Allocator>
22void
23test(const Allocator& a)
24{
25    std::deque<T, Allocator> d(a);
26    assert(d.size() == 0);
27    assert(d.get_allocator() == a);
28}
29
30int main()
31{
32    test<int>(std::allocator<int>());
33    test<NotConstructible>(test_allocator<NotConstructible>(3));
34#if __cplusplus >= 201103L
35    test<int>(min_allocator<int>());
36    test<NotConstructible>(min_allocator<NotConstructible>{});
37#endif
38}
39