1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
| #include <iostream>
#include <vector>
using namespace std;
int main()
{
std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > tmp = std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > >{std::initializer_list<std::vector<int, std::allocator<int> > >{std::vector<int, std::allocator<int> >{std::initializer_list<int>{10, 10}, std::allocator<int>()}, std::vector<int, std::allocator<int> >{std::initializer_list<int>{20, 20}, std::allocator<int>()}, std::vector<int, std::allocator<int> >{std::initializer_list<int>{30, 20}, std::allocator<int>()}}, std::allocator<std::vector<int, std::allocator<int> > >()};
tmp.push_back(std::vector<int, std::allocator<int> >{std::initializer_list<int>{1, 2, 3}, std::allocator<int>()});
std::initializer_list<int> list = std::initializer_list<int>{1, 2, 3, 4, 5};
tmp.emplace_back<std::initializer_list<int> &>(list);
std::vector<int, std::allocator<int> > v = std::vector<int, std::allocator<int> >{std::initializer_list<int>{1, 2, 3}, std::allocator<int>()};
v.operator=(std::initializer_list<int>{1, 2, 3});
std::vector<int, std::allocator<int> > a = std::vector<int, std::allocator<int> >{std::initializer_list<int>{1, 2, 3}, std::allocator<int>()};
return 0;
}
|