Question.4
A generic send function uses templates:
template<typename T> void send(T data) { // T is deduced from the argument transmit(&data, sizeof(T)); } send(NULL); send(nullptr);
What type is T deduced as in each call?
T
Select Answer
Both deduce T as a pointer type
send(NULL) deduces T as int (or long); send(nullptr) deduces T as std::nullptr_t
send(NULL)
int
long
send(nullptr)
std::nullptr_t
Both deduce T as int
Compilation error for both