#include <iostream>
#include <vector>
#include <memory>
struct Test: std::vector<int> {
Test(): std::vector<int>{1,2,3} {
std::cout << __PRETTY_FUNCTION__ << '\n';
}
~Test() {
std::cout << __PRETTY_FUNCTION__ << '\n';
}
};
Test func() {
return Test();
}
int main() {
for (const auto &obj: func()) {
std::cout << obj << '\n';
}
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8dmVjdG9yPgojaW5jbHVkZSA8bWVtb3J5PgoKc3RydWN0IFRlc3Q6IHN0ZDo6dmVjdG9yPGludD4gewogIFRlc3QoKTogc3RkOjp2ZWN0b3I8aW50PnsxLDIsM30gewogICAgc3RkOjpjb3V0IDw8IF9fUFJFVFRZX0ZVTkNUSU9OX18gPDwgJ1xuJzsKICB9CgogIH5UZXN0KCkgewogICAgc3RkOjpjb3V0IDw8IF9fUFJFVFRZX0ZVTkNUSU9OX18gPDwgJ1xuJzsKICB9Cn07CgpUZXN0IGZ1bmMoKSB7CiAgcmV0dXJuIFRlc3QoKTsKfQoKaW50IG1haW4oKSB7CiAgZm9yIChjb25zdCBhdXRvICZvYmo6IGZ1bmMoKSkgewogICAgc3RkOjpjb3V0IDw8IG9iaiA8PCAnXG4nOwoKICB9Cn0K