#include <iostream>
#include <type_traits>

int main() {
	int *p;
	
	// decltype(*p) - тип выражения *p.
	// std::is_same<A, B>::value - true если A и B один и тот же тип.
	if (std::is_same<int&, decltype(*p)>::value)
		std::cout << "*p - ссылка\n";
	else
		std::cout << "*p - не ссылка\n";
}