Ticket #11627: test.C
File test.C, 409 bytes (added by , 7 years ago) |
---|
Line | |
---|---|
1 | #include <vector> |
2 | #include <iostream> |
3 | #include <boost/container/small_vector.hpp> |
4 | |
5 | //typedef std::vector<int> vec; |
6 | typedef boost::container::small_vector<int,10> vec; |
7 | |
8 | int main() |
9 | { |
10 | vec v = {1,2}; |
11 | vec w; |
12 | std::cout<<"v.size() = "<<v.size()<<" w.size() = "<<w.size()<<"\n"; |
13 | std::cout<<" swapping v and w ...\n"; |
14 | v.swap(w); |
15 | std::cout<<"v.size() = "<<v.size()<<" w.size() = "<<w.size()<<"\n"; |
16 | } |
17 |