#include <iostream>
#include <typeinfo>
using namespace std;
template<class T> struct wrap { };
template<class T>
void bar(T &&value) { std::cout << " vs. " << typeid(wrap<T>).name() << std::endl; }
template<class T>
void foo(T &&value) { std::cout << typeid(wrap<T>).name(); return bar(value); }
int main()
{
int i = 1;
foo(static_cast<int &>(i));
foo(static_cast<int const &>(i));
foo(static_cast<int &&>(i));
foo(static_cast<int const &&>(i));
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8dHlwZWluZm8+CnVzaW5nIG5hbWVzcGFjZSBzdGQ7Cgp0ZW1wbGF0ZTxjbGFzcyBUPiBzdHJ1Y3Qgd3JhcCB7IH07Cgp0ZW1wbGF0ZTxjbGFzcyBUPgp2b2lkIGJhcihUICYmdmFsdWUpIHsgc3RkOjpjb3V0IDw8ICIgdnMuICIgPDwgdHlwZWlkKHdyYXA8VD4pLm5hbWUoKSA8PCBzdGQ6OmVuZGw7IH0KCnRlbXBsYXRlPGNsYXNzIFQ+CnZvaWQgZm9vKFQgJiZ2YWx1ZSkgeyBzdGQ6OmNvdXQgPDwgdHlwZWlkKHdyYXA8VD4pLm5hbWUoKTsgcmV0dXJuIGJhcih2YWx1ZSk7IH0KCmludCBtYWluKCkKewoJaW50IGkgPSAxOwoJZm9vKHN0YXRpY19jYXN0PGludCAmPihpKSk7Cglmb28oc3RhdGljX2Nhc3Q8aW50IGNvbnN0ICY+KGkpKTsKCWZvbyhzdGF0aWNfY2FzdDxpbnQgJiY+KGkpKTsKCWZvbyhzdGF0aWNfY2FzdDxpbnQgY29uc3QgJiY+KGkpKTsKfQ==