顶层const和底层const

Posted a14907

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了顶层const和底层const相关的知识,希望对你有一定的参考价值。

As we’ve seen, a pointer is an object that can point to a different object. As a result,
we can talk independently about whether a pointer is const and whether the objects
to which it can point are const. We use the term top-level const to indicate that the
pointer itself is a const. When a pointer can point to a const object, we refer to
that const as a low-level const.
 
这是英文的介绍,我感觉清晰明了比那些遮遮掩掩的中文好多了。

以上是关于顶层const和底层const的主要内容,如果未能解决你的问题,请参考以下文章

顶层const和底层const

const关键字总结

细节问题

C++中常量引用指针常量指针指针常量常量引用顶层常量与底层常量

C++中常量引用指针常量指针指针常量常量引用顶层常量与底层常量

C++中常量引用指针常量指针指针常量常量引用顶层常量与底层常量