#include <iostream>
#include <utility>

struct Reading {
    int value;
    explicit Reading(int initial) : value{initial} {}
    Reading(const Reading& other) : value{other.value} {
        std::cout << "copy constructor\n";
    }
    Reading(Reading&& other) : value{other.value} {
        std::cout << "move constructor\n";
    }
    Reading& operator=(const Reading& other) {
        value = other.value;
        std::cout << "copy assignment\n";
        return *this;
    }
    Reading& operator=(Reading&& other) {
        value = other.value;
        std::cout << "move assignment\n";
        return *this;
    }
};

int main() {
    Reading a{4};
    Reading b{a};
    b.value = 9;
    Reading c{std::move(a)};
    Reading d{0};
    d = b;
    d = std::move(c);
    std::cout << a.value << ' ' << b.value << ' ' << c.value << ' ' << d.value << '\n';
    return 0;
}
