#include <iostream>
struct Test
{
Test()
{}
Test(const Test*& other)
{
std::cout << "lvalue" << std::endl;
}
Test(Test*&& other)
{
std::cout << "rvalue" << std::endl;
}
};
Test* f()
{
static Test t;
return &t;
}
int main()
{
Test t = f();
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgoKc3RydWN0IFRlc3QKewogICAgVGVzdCgpCiAgICB7fQoKICAgIFRlc3QoY29uc3QgVGVzdComIG90aGVyKQogICAgewogICAgICAgIHN0ZDo6Y291dCA8PCAibHZhbHVlIiA8PCBzdGQ6OmVuZGw7CiAgICB9CgogICAgVGVzdChUZXN0KiYmIG90aGVyKSAgCiAgICB7CiAgICAgICAgc3RkOjpjb3V0IDw8ICJydmFsdWUiIDw8IHN0ZDo6ZW5kbDsKICAgIH0KfTsKClRlc3QqIGYoKQp7CiAgICBzdGF0aWMgVGVzdCB0OwogICAgcmV0dXJuICZ0Owp9CgppbnQgbWFpbigpCnsgICAKICAgIFRlc3QgdCA9IGYoKTsKICAgIHJldHVybiAwOwp9