I was in the middle of writing this answer when I saw that someone else had already posted it, so I gave up. But then this other answer disappeared, so here it is. If the original appears again, I will delete it.
If Ptr(for example) int*, then it decltype(*Ptr())is evaluated as int&, and not int, which is probably the cause of your error (no matter what it is). Try:
std::remove_reference<decltype(*Ptr())>::type
, , Ptr :
std::remove_reference<decltype(*std::declval<Ptr>())>::type