Lvalue references for const pointers

Viewed 157

Consider the following:

1) const char* const

Above, we are saying that there is a constant pointer (i.e. the pointer itself cannot be modified) pointing to a constant character (i.e. the actual char it is pointing to is const)

How about here:

2) const char*&

In the above, are saying that it is a non-const lvalue reference pointing to a const char*, or is it a const lvalue reference pointing to a char*?

How about here:

3) const char* const&

non-const lvalue reference pointing to a const char* const, a const lvalue reference pointing to a char* const, or a const lvalue reference pointing to a const char*?

Someone explain, please.

0 Answers
Related