Ticket #4820: test.cc

File test.cc, 273 bytes (added by jonathandodd@…, 12 years ago)

demo of any::swap

Line 
1#include <stdio.h>
2#include <algorithm>
3#include <boost/any.hpp>
4
5class Big {
6public:
7 Big() { }
8 Big(const Big&rhs) { printf("Copy constructor\n"); }
9};
10
11int main()
12{
13 using std::swap;
14
15 Big b1, b2;
16 boost::any a1=b1, a2=b2;
17
18 printf("\n");
19 swap(a1,a2);
20
21 return 1;
22}