copy_move_tracer.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#include "crucible/test/copy_move_tracer.hpp" namespace crucible::test { Copy_Move_Tracer::Copy_Move_Tracer() = default; Copy_Move_Tracer::Copy_Move_Tracer(Copy_Move_Tracer const &that) { that.copied_from = true; copied_into = true; } Copy_Move_Tracer::Copy_Move_Tracer(Copy_Move_Tracer &&that) { that.moved_from = true; moved_into = true; } auto Copy_Move_Tracer::operator=(Copy_Move_Tracer const &that) -> Copy_Move_Tracer & { that.copied_from = true; copied_into = true; return *this; } auto Copy_Move_Tracer::operator=(Copy_Move_Tracer &&that) -> Copy_Move_Tracer & { that.moved_from = true; moved_into = true; return *this; } }