copy_move_tracer.hpp
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
33
34
35
36
37
38
#ifndef CRUCIBLE_TEST_COPY_MOVE_TRACER_HPP #define CRUCIBLE_TEST_COPY_MOVE_TRACER_HPP #include "crucible/core/format.hpp" #include <string> namespace crucible::test::copy_move_tracer { struct CopyMoveTracer { mutable bool copied_from { false }; mutable bool copied_into { false }; mutable bool moved_from { false }; mutable bool moved_into { false }; CopyMoveTracer(); CopyMoveTracer(CopyMoveTracer const &that); CopyMoveTracer(CopyMoveTracer &&that); auto operator=(CopyMoveTracer const &that) -> CopyMoveTracer &; auto operator=(CopyMoveTracer &&that) -> CopyMoveTracer &; [[nodiscard]] auto describe() const -> std::string; [[nodiscard]] auto format(core::format::Context const &context) const -> std::string; }; } #endif // CRUCIBLE_TEST_COPY_MOVE_TRACER_HPP