@againtry
That analogy doesn't really work. At this point, you aren't really addressing my argument or debunking any of the points I made, but are just repeating the notion that it's not correct.
I mean, if we're going with animal analogies here, it's kind of like a pigeon that shits on a chessboard and the two players, knocks over all the pieces, declares itself the winner, and flies away.
But, to drive the point home:
1 2 3 4 5 6 7 8 9
|
#include <iomanip>
#include <iostream>
#include <type_traits>
int main()
{
int var{};
std::cout << std::boolalpha << std::is_same_v<decltype(&var), int*>;
}
|
From this, we can deduce the type of &var is the same as int*. Meaning &var's type is int* (int-pointer). Emphasis on the
POINTER. Yes, its an address, but its type is a pointer type. Colloquially, we can refer to &var as a pointer, because it's type is and always will be an int-pointer. Just like
5.0
is a double and
5.0f
is a float.
I rest my case.