| 53 | |
| 54 | #ifndef BOOST_LEAF_NO_EXCEPTIONS |
| 55 | class throws_on_copy |
| 56 | { |
| 57 | throws_on_copy & operator=( throws_on_copy const & )=delete; |
| 58 | |
| 59 | public: |
| 60 | |
| 61 | int value; |
| 62 | |
| 63 | throws_on_copy() |
| 64 | { |
| 65 | BOOST_TEST(++object_count>0); |
| 66 | } |
| 67 | |
| 68 | throws_on_copy( throws_on_copy const & ) |
| 69 | { |
| 70 | throw std::exception(); |
| 71 | } |
| 72 | |
| 73 | throws_on_copy( throws_on_copy && ) |
| 74 | { |
| 75 | BOOST_TEST(++object_count>0); |
| 76 | } |
| 77 | |
| 78 | ~throws_on_copy() |
| 79 | { |
| 80 | BOOST_TEST(--object_count>=0); |
| 81 | } |
| 82 | }; |
| 83 | #endif |
| 84 | |
| 85 | void run_tests() |