Advertisement
Guest User

Untitled

a guest
Jun 25th, 2017
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.36 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. #include <boost/any.hpp>
  6.  
  7. using namespace boost;
  8.  
  9. class Big
  10. {
  11. public:
  12.     Big() { };
  13.     Big(const Big&rhs) { d = rhs.d; cout<<"In Big copy constructor"<<endl; }
  14.    
  15.     double d;  
  16. };
  17.  
  18. int main()
  19. {
  20.     Big b1, b2;
  21.    
  22.     any a1 = b1, a2 = b2;
  23.     cout<<"------------------------"<<endl;
  24.    
  25.     std::swap(a1,a2);
  26.    
  27.     return 1;
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement