1 //===----------------------------------------------------------------------===//
3 // The LLVM Compiler Infrastructure
5 // This file is dual licensed under the MIT and the University of Illinois Open
6 // Source Licenses. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
12 // vector(const Alloc& = Alloc());
17 #include "test_allocator.h"
18 #include "../../../NotConstructible.h"
19 #include "../../../stack_allocator.h"
20 #include "min_allocator.h"
27 assert(c.__invariants());
29 assert(c.get_allocator() == typename C::allocator_type());
34 test1(const typename C::allocator_type& a)
37 assert(c.__invariants());
39 assert(c.get_allocator() == a);
45 test0<std::vector<int> >();
46 test0<std::vector<NotConstructible> >();
47 test1<std::vector<int, test_allocator<int> > >(test_allocator<int>(3));
48 test1<std::vector<NotConstructible, test_allocator<NotConstructible> > >
49 (test_allocator<NotConstructible>(5));
52 std::vector<int, stack_allocator<int, 10> > v;
55 #if __cplusplus >= 201103L
57 test0<std::vector<int, min_allocator<int>> >();
58 test0<std::vector<NotConstructible, min_allocator<NotConstructible>> >();
59 test1<std::vector<int, min_allocator<int> > >(min_allocator<int>{});
60 test1<std::vector<NotConstructible, min_allocator<NotConstructible> > >
61 (min_allocator<NotConstructible>{});
64 std::vector<int, min_allocator<int> > v;