I ask simply why is it allowed to pass the memory location of an object/primitive through a non-type template when I would traditionally expect memory to be allocated and used at runtime. I am aware that the variable whose memory is passed must have external linkage but given that, does that mean the memory locations for externally linked variables are always constant? To illustrate:
template<std::string *temp>
void f();
Wouldn`t the memory location passed through the template vary everytime the program is executed and therefore not be a compile time constant as I thought templates required for non-type arguments?