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(initializer_list<value_type> il, const Allocator& a = allocator_type());
17 #include "test_allocator.h"
18 #include "min_allocator.h"
19 #include "asan_testing.h"
23 #ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
25 std::vector<int, test_allocator<int>> d({3, 4, 5, 6}, test_allocator<int>(3));
26 assert(d.get_allocator() == test_allocator<int>(3));
27 assert(d.size() == 4);
28 assert(is_contiguous_container_asan_correct(d));
34 #if __cplusplus >= 201103L
36 std::vector<int, min_allocator<int>> d({3, 4, 5, 6}, min_allocator<int>());
37 assert(d.get_allocator() == min_allocator<int>());
38 assert(d.size() == 4);
39 assert(is_contiguous_container_asan_correct(d));
46 #endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS