📜  c++ const shared_ptr - C++ 代码示例

📅  最后修改于: 2022-03-11 14:44:47.680000             🧑  作者: Mango

代码示例1
shared_ptr p;             ---> T * p;                                    : nothing is const
const shared_ptr p;       ---> T * const p;                              : p is const
shared_ptr p;       ---> const T * p;       <=> T const * p;       : *p is const
const shared_ptr p; ---> const T * const p; <=> T const * const p; : p and *p are const.