Is the result of decltype the same as the template identifier? (And what is the correct term when referring to T and its value?). That is are there cases where the assert fails?
template<typename T>
void foo(T x)
{
static_assert(std::is_same<decltype(x), T>::value, "decltype check failed");
}
Type of the variable
xis T, therefore that static_assert is always going to pass.