struct meow { static int defaults; static int copies; static int moves; static int destroys; static void report() { std::cout << "defaults: " << defaults << std::endl; std::cout << "copies: " << copies << std::endl; std::cout << "moves: " << moves << std::endl; std::cout << "destroys: " << destroys << std::endl; } bool moved = false; meow() { std::cout << __PRETTY_FUNCTION__ << std::endl; ++defaults; } meow(const meow&) { std::cout << __PRETTY_FUNCTION__ << std::endl; ++copies; } meow(meow&& rhs) { std::cout << __PRETTY_FUNCTION__ << std::endl; rhs.moved = true; ++moves; } ~meow() { std::cout << __PRETTY_FUNCTION__; if (!moved) { std::cout << " (not moved!)"; } std::cout << std::endl; ++destroys; } }; int meow::defaults = 0; int meow::copies = 0; int meow::moves = 0; int meow::destroys = 0;