I don't see where you get the idea that the pointer has to be stored somewhere. For what purpose? There's no C++ code that would require that pointer to be stored anywhere.
When an abstract C++ machine evaluates something like
int a = 2, b = 3, c = 4;
int i = (a + b) * c;
the inner subexpression a + b
evaluates to 5
. However, that 5
is not really stored anywhere from the language point of view. It is just a temporary value of 5
that exists for a fleeting moment only to be multiplied by c
and forgotten forever. Such immaterial expression results in C++ are called rvalues. It is generally unspecified where rvalues live. During the evaluation of the above expression, the value of 5
might appear for a moment in some CPU register. Or it might even be temporarily stored in some unnamed memory area, if the compiler decided to do so, but this is not something you can see at the level of C++ code.
The same is true for the pointer resulting from array-to-pointer conversion. That pointer is juts an rvalue - a temporary value that doesn't live anywhere in memory. It simply doesn't need to live anywhere in memory.
It is not clear what you are trying to express by your &array
reference. Expression &array
does not involve array-to-pointer conversion, which means that it has no relation to the issue in question at all.