#include #include #include #include int main(void) { std::vector> v; std::unique_ptr q(new int(42)); assert(q != NULL); // v.push_back(q); v.push_back(std::move(q)); assert(q == NULL); for(auto &e: v) { std::cout << *e << std::endl; } }