#include <type_traits>
template<class ptr_to_t>
void f(ptr_to_t x) {
typedef ptr_to_t t; // does not compile
typename std::remove_pointer<t>::type elem = *x;
}
int main()
{
int five = 5;
f<int*>(&five);
return 0;
}
I2luY2x1ZGUgPHR5cGVfdHJhaXRzPgoKdGVtcGxhdGU8Y2xhc3MgcHRyX3RvX3Q+CnZvaWQgZihwdHJfdG9fdCB4KSB7CiAgICB0eXBlZGVmIHB0cl90b190IHQ7IC8vIGRvZXMgbm90IGNvbXBpbGUKICAgIHR5cGVuYW1lIHN0ZDo6cmVtb3ZlX3BvaW50ZXI8dD46OnR5cGUgZWxlbSA9ICp4Owp9CgppbnQgbWFpbigpCnsKICAgIGludCBmaXZlID0gNTsKICAgIGY8aW50Kj4oJmZpdmUpOwogICAgcmV0dXJuIDA7Cn0=