顶层Const和底层Const的问题

轮子哥的解释:

顶层和底层的翻译很容易让人误解为就只有两层,实际上当然是不是的。首先我们假设有这样的代码:template using Const = const T;
template using Ptr = T*;
然后const int *** const shit = nullptr;
要怎么看呢?很简单,不要用const和*,用Const和Ptr来表达,马上明白:Const<Ptr<Ptr<Ptr<Const>>>> shit = nullptr;
一秒学会

https://www.zhihu.com/question/24785843/answer/238903938

即:从右向左读,星号读作pointer,没多一层加一个to,然后最前面加上declare就行。比如对const int *** const shit;,可以读作:declare shit as const pointer to pointer to pointer to const int。

顶层指指针本身是常量,底层指所指对象是一个常量
拷贝时顶层const不做限制,但底层const所复制的对象必须有底层const属性。