#include <iostream>
#include <queue>
#include <algorithm>
#include <vector>
using namespace std;
class C {
public:
C() {cout<<"CTOR\n";}
~C() {cout<<"DTOR\n";}
C(const C& c) { cout<<"COPY CTOR\n";};
C(const C&& c) { cout<<"MOVE CTOR\n";};
};
int main() {
{
vector<C> c;
C cobj;
//cout<<"pushing normally:\n";
//c.push(cobj);
cout<<"pushing with move\n";
c.push_back(move(cobj)); // same output as line above
cout<<"popping\n";
// c.pop();
//c.pop();
cout<<"end of scope\n";
}
//cin.get();
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8cXVldWU+CiNpbmNsdWRlIDxhbGdvcml0aG0+CiNpbmNsdWRlIDx2ZWN0b3I+CnVzaW5nIG5hbWVzcGFjZSBzdGQ7CgpjbGFzcyBDIHsKcHVibGljOgogICAgQygpIHtjb3V0PDwiQ1RPUlxuIjt9CiAgICB+QygpIHtjb3V0PDwiRFRPUlxuIjt9CiAgICBDKGNvbnN0IEMmIGMpIHsgY291dDw8IkNPUFkgQ1RPUlxuIjt9OwogICAgQyhjb25zdCBDJiYgYykgeyBjb3V0PDwiTU9WRSBDVE9SXG4iO307Cgp9OwoKaW50IG1haW4oKSB7CgogICAgewogICAgICAgIHZlY3RvcjxDPiBjOwogICAgICAgIEMgY29iajsKICAgICAgICAvL2NvdXQ8PCJwdXNoaW5nIG5vcm1hbGx5OlxuIjsKICAgICAgICAvL2MucHVzaChjb2JqKTsKICAgICAgICBjb3V0PDwicHVzaGluZyB3aXRoIG1vdmVcbiI7CiAgICAgICAgYy5wdXNoX2JhY2sobW92ZShjb2JqKSk7IC8vIHNhbWUgb3V0cHV0IGFzIGxpbmUgYWJvdmUKICAgICAgICBjb3V0PDwicG9wcGluZ1xuIjsKICAgICAgIC8vIGMucG9wKCk7CiAgICAgICAgLy9jLnBvcCgpOwogICAgICAgIGNvdXQ8PCJlbmQgb2Ygc2NvcGVcbiI7CiAgICB9CgkvL2Npbi5nZXQoKTsKfQ==