| 16 | } |
| 17 | |
| 18 | struct test { |
| 19 | int m_x; |
| 20 | |
| 21 | test(int x) |
| 22 | : m_x(x) |
| 23 | { |
| 24 | log("test(" + fplus::show(m_x) + ")"); |
| 25 | } |
| 26 | test(const test& t) |
| 27 | : m_x(t.m_x) |
| 28 | { |
| 29 | log("test(const test& " + fplus::show(m_x) + ")"); |
| 30 | } |
| 31 | test(test&& t) |
| 32 | : m_x(std::move(t.m_x)) |
| 33 | { |
| 34 | log("test(test&& " + fplus::show(m_x) + ")"); |
| 35 | } |
| 36 | |
| 37 | test& operator=(int x) |
| 38 | { |
| 39 | m_x = x; |
| 40 | log("test::operator=(" + fplus::show(m_x) + ")"); |
| 41 | return *this; |
| 42 | } |
| 43 | test& operator=(const test& t) |
| 44 | { |
| 45 | m_x = t.m_x; |
| 46 | log("test::operator=(const test& " + fplus::show(m_x) + ")"); |
| 47 | return *this; |
| 48 | } |
| 49 | test& operator=(test&& t) |
| 50 | { |
| 51 | m_x = std::move(t.m_x); |
| 52 | log("test::operator=(test&& " + fplus::show(m_x) + ")"); |
| 53 | return *this; |
| 54 | } |
| 55 | |
| 56 | ~test() { log("~test(" + fplus::show(m_x) + ")"); } |
| 57 | }; |
| 58 | } |
| 59 | |
| 60 | TEST_CASE("shared_ref_test - full") |
no test coverage detected