#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));
}