| 15 | logger dlog("test.te"); |
| 16 | |
| 17 | struct A |
| 18 | { |
| 19 | A( |
| 20 | int& copy_counter_, |
| 21 | int& move_counter_, |
| 22 | int& delete_counter_ |
| 23 | ) : copy_counter{copy_counter_}, |
| 24 | move_counter{move_counter_}, |
| 25 | delete_counter{delete_counter_} |
| 26 | {} |
| 27 | |
| 28 | A(const A& other) |
| 29 | : copy_counter{other.copy_counter}, |
| 30 | move_counter{other.move_counter}, |
| 31 | delete_counter{other.delete_counter} |
| 32 | { |
| 33 | ++copy_counter; |
| 34 | } |
| 35 | |
| 36 | A(A&& other) |
| 37 | : copy_counter{other.copy_counter}, |
| 38 | move_counter{other.move_counter}, |
| 39 | delete_counter{other.delete_counter} |
| 40 | { |
| 41 | ++move_counter; |
| 42 | } |
| 43 | |
| 44 | ~A() |
| 45 | { |
| 46 | ++delete_counter; |
| 47 | } |
| 48 | |
| 49 | int& copy_counter; |
| 50 | int& move_counter; |
| 51 | int& delete_counter; |
| 52 | }; |
| 53 | |
| 54 | template <typename Storage> |
| 55 | void test_storage_basic() |
no outgoing calls