You would use the T* const & parameter as a parameter if the value of the pointer object could be changed by something external to your function, and you would like to see changes in the value of the pointer object or if you want to save the link or pointer to a pointer object for later reading.
Parameter
A T* (equivalent to T* const as a function parameter) just gives you a copy of the pointer object, a snapshot of its value when it was passed to your function.
void foo( char* const& ptr ) { char* p1 = ptr;
vs
void foo2( char* ptr ) { char* p1 = ptr;
Technically, even the function itself can change the value of the pointer to which the reference is transmitted.
eg.
char* p; std::ptrdiff_t foo( char* const& ptr ) { ++p; return p - ptr;
source share