| 16 | int value_count=0; |
| 17 | |
| 18 | class my_info |
| 19 | { |
| 20 | my_info & operator=( my_info const & ) = delete; |
| 21 | |
| 22 | public: |
| 23 | |
| 24 | int value; |
| 25 | |
| 26 | explicit my_info( int val ): |
| 27 | value(val) |
| 28 | { |
| 29 | BOOST_TEST(++object_count>0); |
| 30 | BOOST_TEST(++value_count>0); |
| 31 | } |
| 32 | |
| 33 | my_info( my_info const & x ): |
| 34 | value(x.value) |
| 35 | { |
| 36 | BOOST_TEST(++object_count>0); |
| 37 | BOOST_TEST(++value_count>0); |
| 38 | } |
| 39 | |
| 40 | my_info( my_info && x ): |
| 41 | value(x.value) |
| 42 | { |
| 43 | x.value=-1; |
| 44 | BOOST_TEST(++object_count>0); |
| 45 | } |
| 46 | ~my_info() |
| 47 | { |
| 48 | BOOST_TEST(--object_count>=0); |
| 49 | if( value != -1 ) |
| 50 | BOOST_TEST(--value_count>=0); |
| 51 | } |
| 52 | }; |
| 53 | |
| 54 | #ifndef BOOST_LEAF_NO_EXCEPTIONS |
| 55 | class throws_on_copy |