• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 // <vector>
11 
12 // vector(initializer_list<value_type> il);
13 
14 #include <vector>
15 #include <cassert>
16 #include "min_allocator.h"
17 
main()18 int main()
19 {
20 #ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
21     {
22     std::vector<int> d = {3, 4, 5, 6};
23     assert(d.size() == 4);
24     assert(d[0] == 3);
25     assert(d[1] == 4);
26     assert(d[2] == 5);
27     assert(d[3] == 6);
28     }
29 #if __cplusplus >= 201103L
30     {
31     std::vector<int, min_allocator<int>> d = {3, 4, 5, 6};
32     assert(d.size() == 4);
33     assert(d[0] == 3);
34     assert(d[1] == 4);
35     assert(d[2] == 5);
36     assert(d[3] == 6);
37     }
38 #endif
39 #endif  // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
40 }
41